summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--resources/qml/PrivacyScreen.qml15
-rw-r--r--resources/qml/components/FlatButton.qml23
-rw-r--r--resources/qml/delegates/PlayableMediaMessage.qml22
-rw-r--r--resources/qml/emoji/StickerPicker.qml11
-rw-r--r--resources/qml/ui/Ripple.qml5
-rw-r--r--resources/qml/ui/Spinner.qml12
-rw-r--r--resources/qml/ui/animations/BlinkAnimation.qml3
-rw-r--r--src/LoginPage.cpp2
8 files changed, 46 insertions, 47 deletions
diff --git a/resources/qml/PrivacyScreen.qml b/resources/qml/PrivacyScreen.qml
index 5967f25d..da196667 100644
--- a/resources/qml/PrivacyScreen.qml
+++ b/resources/qml/PrivacyScreen.qml
@@ -2,10 +2,10 @@
 //
 // SPDX-License-Identifier: GPL-3.0-or-later
 
-import QtGraphicalEffects 1.0
-import QtQuick 2.12
-import QtQuick.Window 2.2
-import im.nheko 1.0
+import QtQuick
+import QtQuick.Window
+import im.nheko
+import QtQuick.Effects
 
 Item {
     id: privacyScreen
@@ -100,12 +100,15 @@ Item {
             }
         ]
 
-        FastBlur {
+        MultiEffect {
             id: blur
 
+            blurEnabled: true
+
             anchors.fill: parent
             source: timelineRoot
-            radius: 50
+            blur: 1.0
+            blurMax: 32
         }
 
     }
diff --git a/resources/qml/components/FlatButton.qml b/resources/qml/components/FlatButton.qml
index ec4b306a..a3dedf35 100644
--- a/resources/qml/components/FlatButton.qml
+++ b/resources/qml/components/FlatButton.qml
@@ -2,11 +2,11 @@
 //
 // SPDX-License-Identifier: GPL-3.0-or-later
 
-import QtGraphicalEffects 1.12
-import QtQuick 2.9
-import QtQuick.Controls 2.5
-import QtQuick.Layouts 1.2
-import im.nheko 1.0
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+import QtQuick.Effects
+import im.nheko
 
 // FIXME(Nico): Don't use hardcoded colors.
 Button {
@@ -18,14 +18,13 @@ Button {
 
     property string iconImage: ""
 
-    DropShadow {
+    MultiEffect {
         anchors.fill: control.background
-        horizontalOffset: 3
-        verticalOffset: 3
-        radius: 8
-        samples: 17
-        cached: true
-        color: "#80000000"
+        shadowHorizontalOffset: 3
+        shadowVerticalOffset: 3
+        shadowBlur: 8
+        shadowEnabled: true
+        shadowColor: "#80000000"
         source: control.background
     }
 
diff --git a/resources/qml/delegates/PlayableMediaMessage.qml b/resources/qml/delegates/PlayableMediaMessage.qml
index 741369d2..1131856f 100644
--- a/resources/qml/delegates/PlayableMediaMessage.qml
+++ b/resources/qml/delegates/PlayableMediaMessage.qml
@@ -4,11 +4,11 @@
 
 import "../"
 import "../ui/media"
-import QtMultimedia 5.15
-import QtQuick 2.15
-import QtQuick.Controls 2.15
-import QtQuick.Layouts 1.15
-import im.nheko 1.0
+import QtMultimedia
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+import im.nheko
 
 Item {
     id: content
@@ -36,12 +36,12 @@ Item {
         id: mxcmedia
 
         // TODO: Show error in overlay or so?
-        onError: console.log(error)
         roomm: room
-        // desiredVolume is a float from 0.0 -> 1.0, MediaPlayer volume is an int from 0 to 100
-        // this value automatically gets clamped for us between these two values.
-        volume: mediaControls.desiredVolume * 100
-        muted: mediaControls.muted
+        audioOutput: AudioOutput {
+            muted: mediaControls.muted
+            volume: mediaControls.desiredVolume
+        }
+        videoOutput: videoOutput
     }
 
     Rectangle {
@@ -68,8 +68,6 @@ Item {
                 clip: true
                 anchors.fill: parent
                 fillMode: VideoOutput.PreserveAspectFit
-                source: mxcmedia
-                flushMode: VideoOutput.FirstFrame
                 orientation: mxcmedia.orientation
             }
 
diff --git a/resources/qml/emoji/StickerPicker.qml b/resources/qml/emoji/StickerPicker.qml
index 38788899..9a5cd6d1 100644
--- a/resources/qml/emoji/StickerPicker.qml
+++ b/resources/qml/emoji/StickerPicker.qml
@@ -3,12 +3,11 @@
 // SPDX-License-Identifier: GPL-3.0-or-later
 
 import "../"
-import QtGraphicalEffects 1.0
-import QtQuick 2.9
-import QtQuick.Controls 2.3
-import QtQuick.Layouts 1.3
-import im.nheko 1.0
-import im.nheko.EmojiModel 1.0
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+import im.nheko
+import im.nheko.EmojiModel
 
 Menu {
     id: stickerPopup
diff --git a/resources/qml/ui/Ripple.qml b/resources/qml/ui/Ripple.qml
index 192909b2..73d8520f 100644
--- a/resources/qml/ui/Ripple.qml
+++ b/resources/qml/ui/Ripple.qml
@@ -2,9 +2,8 @@
 //
 // SPDX-License-Identifier: GPL-3.0-or-later
 
-import QtGraphicalEffects 1.0
-import QtQuick 2.15
-import QtQuick.Controls 2.15
+import QtQuick
+import QtQuick.Controls
 
 Item {
     id: ripple
diff --git a/resources/qml/ui/Spinner.qml b/resources/qml/ui/Spinner.qml
index a88318c6..9c0c8a31 100644
--- a/resources/qml/ui/Spinner.qml
+++ b/resources/qml/ui/Spinner.qml
@@ -3,8 +3,8 @@
 // SPDX-License-Identifier: GPL-3.0-or-later
 
 import "./animations"
-import QtGraphicalEffects 1.12
-import QtQuick 2.12
+import QtQuick
+import QtQuick.Effects
 
 Item {
     id: spinner
@@ -139,11 +139,11 @@ Item {
 
     }
 
-    Glow {
+    MultiEffect {
         anchors.fill: row
-        radius: 14
-        samples: 17
-        color: spinner.foreground
+        shadowBlur: 14
+        shadowEnabled: true
+        shadowColor: spinner.foreground
         source: row
 
         transform: Matrix4x4 {
diff --git a/resources/qml/ui/animations/BlinkAnimation.qml b/resources/qml/ui/animations/BlinkAnimation.qml
index ae730452..de2a11d8 100644
--- a/resources/qml/ui/animations/BlinkAnimation.qml
+++ b/resources/qml/ui/animations/BlinkAnimation.qml
@@ -2,8 +2,7 @@
 //
 // SPDX-License-Identifier: GPL-3.0-or-later
 
-import QtGraphicalEffects 1.12
-import QtQuick 2.12
+import QtQuick
 
 SequentialAnimation {
     property alias target: numberAnimation.target
diff --git a/src/LoginPage.cpp b/src/LoginPage.cpp
index 8d6a69cf..55487502 100644
--- a/src/LoginPage.cpp
+++ b/src/LoginPage.cpp
@@ -25,6 +25,8 @@ LoginPage::LoginPage(QObject *parent)
   : QObject(parent)
   , inferredServerAddress_()
 {
+    [[maybe_unused]] static auto ignored = qRegisterMetaType<mtx::responses::Login>();
+
     connect(this, &LoginPage::versionOkCb, this, &LoginPage::versionOk, Qt::QueuedConnection);
     connect(this, &LoginPage::versionErrorCb, this, &LoginPage::versionError, Qt::QueuedConnection);
     connect(