summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2021-01-26 00:03:09 -0500
committerJoseph Donofry <joedonofry@gmail.com>2021-01-26 00:03:09 -0500
commitcb93ac3402a9b8d8862ce97d05386c52811166c5 (patch)
treebfb982da80ebc4251bc1bc6271daec8352793d48 /resources
parentInitial commit for privacy screen (diff)
downloadnheko-cb93ac3402a9b8d8862ce97d05386c52811166c5.tar.xz
Fix formatting
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/PrivacyScreen.qml27
-rw-r--r--resources/qml/TimelineView.qml1
2 files changed, 18 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 + +} diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 5f43de55..35d09d5a 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml
@@ -189,6 +189,7 @@ Page { ColumnLayout { id: timelineLayout + visible: TimelineManager.timeline != null anchors.fill: parent spacing: 0