summary refs log tree commit diff
path: root/resources/qml/PrivacyScreen.qml
diff options
context:
space:
mode:
Diffstat (limited to 'resources/qml/PrivacyScreen.qml')
-rw-r--r--resources/qml/PrivacyScreen.qml29
1 files changed, 4 insertions, 25 deletions
diff --git a/resources/qml/PrivacyScreen.qml b/resources/qml/PrivacyScreen.qml
index 037cd91d..5967f25d 100644
--- a/resources/qml/PrivacyScreen.qml
+++ b/resources/qml/PrivacyScreen.qml
@@ -10,6 +10,7 @@ import im.nheko 1.0
 Item {
     id: privacyScreen
 
+    readonly property bool active: Settings.privacyScreen && screenSaver.state === "Visible"
     property var timelineRoot
     property int screenTimeout
 
@@ -59,7 +60,6 @@ Item {
                     target: screenSaver
                     opacity: 1
                 }
-
             },
             State {
                 name: "Invisible"
@@ -73,34 +73,13 @@ Item {
                     target: screenSaver
                     visible: false
                 }
-
             }
         ]
         transitions: [
             Transition {
-                from: "Visible"
-                to: "Invisible"
-
-                SequentialAnimation {
-                    NumberAnimation {
-                        target: screenSaver
-                        property: "opacity"
-                        duration: 250
-                        easing.type: Easing.InQuad
-                    }
-
-                    NumberAnimation {
-                        target: screenSaver
-                        property: "visible"
-                        duration: 0
-                    }
-
-                }
-
-            },
-            Transition {
                 from: "Invisible"
                 to: "Visible"
+                reversible: true
 
                 SequentialAnimation {
                     NumberAnimation {
@@ -112,8 +91,8 @@ Item {
                     NumberAnimation {
                         target: screenSaver
                         property: "opacity"
-                        duration: 500
-                        easing.type: Easing.InQuad
+                        duration: 300
+                        easing.type: Easing.Linear
                     }
 
                 }