Skip to content

Commit 055467b

Browse files
committed
blur tweaks
1 parent fcc44c0 commit 055467b

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

Modules/LockScreen/LockScreenBackground.qml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,29 @@ Item {
121121
// Also used as fade in / fade out backdrop
122122
ScreencopyView {
123123
id: lockBgScreencopy
124-
visible: useEffects && (useScreencopy || useWallpaper)
125124
anchors.fill: parent
126125
captureSource: screen
126+
visible: lockBgRender.visible && lockBgRender.opacity < 0.99
127+
128+
// This is to observe a bug where screen is null on the first lock
129+
// and is only a valid value after 1ms into the lock screen...
130+
Timer {
131+
id: recaptureWhenEmpty
132+
interval: 1
133+
repeat: false
134+
onTriggered: {
135+
Logger.w("LockScreenBackground", "Screen after is: ", screen);
136+
// there's no use for this after the screen's already locked
137+
// lockBgScreencopy.captureFrame()
138+
}
139+
}
140+
141+
Component.onCompleted: {
142+
if (!hasContent) {
143+
Logger.w("LockScreenBackground", "Screen now is: ", screen);
144+
recaptureWhenEmpty.start();
145+
}
146+
}
127147
}
128148

129149
// If using a solid color wallpaper
@@ -155,8 +175,8 @@ Item {
155175
source: useScreencopy ? lockBgScreencopy : lockBgImage
156176

157177
blurEnabled: Settings.data.general.lockScreenBlur > 0
158-
blur: Settings.data.general.lockScreenBlur
159-
blurMax: 128
178+
blur: Settings.data.general.lockScreenBlur * transitionProgress
179+
blurMax: 64
160180

161181
Rectangle {
162182
anchors.fill: parent

0 commit comments

Comments
 (0)