Cleanup privacy screen, no more grabImage
3 files changed, 13 insertions, 35 deletions
diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml
index 4c73f28b..5d335872 100644
--- a/resources/qml/MessageInput.qml
+++ b/resources/qml/MessageInput.qml
@@ -273,6 +273,7 @@ Rectangle {
cursorShape: Qt.IBeamCursor
onClicked: TimelineManager.timeline.input.paste(true)
}
+
}
ScrollBar.vertical: ScrollBar {
diff --git a/resources/qml/PrivacyScreen.qml b/resources/qml/PrivacyScreen.qml
index 2cfae471..76520706 100644
--- a/resources/qml/PrivacyScreen.qml
+++ b/resources/qml/PrivacyScreen.qml
@@ -6,11 +6,8 @@ Item {
id: privacyScreen
property var timelineRoot
- property var imageSource: ""
property int screenTimeout
- anchors.fill: parent
-
Connections {
target: TimelineManager
onFocusChanged: {
@@ -31,22 +28,16 @@ Item {
interval: screenTimeout * 1000
running: true
onTriggered: {
- if (MainWindow.visible)
- timelineRoot.grabToImage(function(result) {
- screenSaver.state = "Visible";
- imageSource = result.url;
- }, Qt.size(width, height));
-
+ screenSaver.state = "Visible";
}
}
- Rectangle {
+ Item {
id: screenSaver
state: "Invisible"
anchors.fill: parent
visible: false
- color: "transparent"
states: [
State {
name: "Visible"
@@ -122,27 +113,11 @@ Item {
}
]
- Image {
- id: image
-
- cache: false
- anchors.fill: parent
- source: imageSource
- }
-
- ShaderEffectSource {
- id: effectSource
-
- sourceItem: image
- anchors.fill: image
- sourceRect: Qt.rect(0, 0, width, height)
- }
-
FastBlur {
id: blur
- anchors.fill: effectSource
- source: effectSource
+ anchors.fill: parent
+ source: timelineRoot
radius: 50
}
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 9fa2139e..c03e8d31 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -277,19 +277,21 @@ Page {
MessageInput {
}
+
}
NhekoDropArea {
- anchors.fill: timelineLayout
+ anchors.fill: parent
roomid: TimelineManager.timeline ? TimelineManager.timeline.roomId() : ""
}
- PrivacyScreen {
- visible: Settings.privacyScreen
- screenTimeout: Settings.privacyScreenTimeout
- timelineRoot: timelineRoot
- }
+ }
+ PrivacyScreen {
+ anchors.fill: parent
+ visible: Settings.privacyScreen
+ screenTimeout: Settings.privacyScreenTimeout
+ timelineRoot: timelineLayout
}
systemInactive: SystemPalette {
|