lock screen: show clear desktop first, reveal blur and hexes as wave passes

This commit is contained in:
Damocles 2026-04-18 11:31:20 +02:00
parent fe02eed625
commit e4b257d760
2 changed files with 16 additions and 16 deletions

View file

@ -7,15 +7,8 @@ Item {
property bool running: false
property bool reducedMotion: S.Theme.reducedMotion
property bool overlay: false
readonly property real wavePhase: fx.uWavePhase
Rectangle {
anchors.fill: parent
color: S.Theme.base01
visible: !root.overlay
}
ShaderEffect {
id: fx
anchors.fill: parent

View file

@ -13,16 +13,24 @@ WlSessionLockSurface {
color: S.Theme.base00
// Background opacity driven by the first wave sweep across the screen
// Wave progress drives blur/dim/hex overlay reveal
property real _unlockFade: 1
readonly property real _bgOpacity: (root.width > 0 ? Math.max(0, Math.min(1, _hexWave.wavePhase / root.width)) : 0) * _unlockFade
readonly property real _waveProgress: (root.width > 0 ? Math.max(0, Math.min(1, _hexWave.wavePhase / root.width)) : 0) * _unlockFade
// Blur screenshot of desktop as background
// Clear desktop screenshot - visible immediately
ScreencopyView {
anchors.fill: parent
captureSource: root.screen
opacity: root._bgOpacity
visible: S.Modules.lock.screenshot ?? true
opacity: _unlockFade
}
// Blurred screenshot - fades in as wave passes
ScreencopyView {
anchors.fill: parent
captureSource: root.screen
visible: S.Modules.lock.screenshot ?? true
opacity: root._waveProgress
layer.enabled: true
layer.effect: MultiEffect {
@ -33,20 +41,19 @@ WlSessionLockSurface {
}
}
// Dim overlay
// Dim overlay - fades in with wave
Rectangle {
anchors.fill: parent
color: Qt.rgba(S.Theme.base00.r, S.Theme.base00.g, S.Theme.base00.b, 0.4)
opacity: root._bgOpacity
opacity: root._waveProgress
}
// Hex wave overlay - visible immediately so the sweep reveals the background
// Hex wave - fades in with wave progress
C.HexWaveBackground {
id: _hexWave
anchors.fill: parent
running: root.lock.secure
overlay: true
opacity: 0.4
opacity: root._waveProgress * 0.4
}
// Keyboard input via TextInput - engages Qt's full input pipeline including