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.qml27
1 files changed, 17 insertions, 10 deletions
diff --git a/resources/qml/PrivacyScreen.qml b/resources/qml/PrivacyScreen.qml

index 497630f1..9fdd35e0 100644 --- a/resources/qml/PrivacyScreen.qml +++ b/resources/qml/PrivacyScreen.qml
@@ -1,22 +1,24 @@ -import QtQuick 2.12 import QtGraphicalEffects 1.0 +import QtQuick 2.12 Item { property var timelineRoot property var imageSource property int screenTimeout + anchors.fill: parent Timer { id: screenSaverTimer + interval: screenTimeout * 1000 running: true onTriggered: { timelineRoot.grabToImage(function(result) { imageSource = result.url; - screenSaver.visible = true - particles.resume() - }, Qt.size(width, height)) + screenSaver.visible = true; + particles.resume(); + }, Qt.size(width, height)); } } @@ -34,13 +36,15 @@ Item { Rectangle { id: screenSaver + anchors.fill: parent visible: false color: "transparent" Image { id: image - visible : screenSaver.visible + + visible: screenSaver.visible anchors.fill: parent source: imageSource } @@ -50,11 +54,12 @@ Item { sourceItem: image anchors.fill: image - sourceRect: Qt.rect(0,0, width, height) + sourceRect: Qt.rect(0, 0, width, height) } - FastBlur{ + FastBlur { id: blur + anchors.fill: effectSource source: effectSource radius: 50 @@ -64,11 +69,13 @@ Item { anchors.fill: parent propagateComposedEvents: true hoverEnabled: true - onClicked: { + onClicked: { screenSaver.visible = false; screenSaverTimer.restart(); - mouse.accepted = false + mouse.accepted = false; } } + } -} \ No newline at end of file + +}