reveal lock screen background as first hex wave passes

This commit is contained in:
Damocles 2026-04-18 11:02:59 +02:00
parent 19396b1508
commit 8a701516e4
3 changed files with 16 additions and 10 deletions

View file

@ -7,6 +7,7 @@ Item {
property bool running: false
property bool reducedMotion: S.Theme.reducedMotion
readonly property real wavePhase: fx.uWavePhase
Rectangle {
anchors.fill: parent

View file

@ -13,12 +13,9 @@ WlSessionLockSurface {
color: S.Theme.base00
property real _bgOpacity: 0
NumberAnimation on _bgOpacity {
to: 1
duration: 400
easing.type: Easing.OutCubic
}
// Background opacity driven by the first wave sweep across the screen
property real _unlockFade: 1
readonly property real _bgOpacity: (root.width > 0 ? Math.max(0, Math.min(1, _hexWave.wavePhase / root.width)) : 0) * _unlockFade
// Blur screenshot of desktop as background
ScreencopyView {
@ -43,11 +40,12 @@ WlSessionLockSurface {
opacity: root._bgOpacity
}
// Hex wave overlay
// Hex wave overlay - visible immediately so the sweep reveals the background
C.HexWaveBackground {
id: _hexWave
anchors.fill: parent
running: root.lock.secure
opacity: root._bgOpacity * 0.4
opacity: 0.4
}
// Keyboard input via TextInput - engages Qt's full input pipeline including
@ -231,7 +229,14 @@ WlSessionLockSurface {
}
NumberAnimation {
target: root
property: "_bgOpacity"
property: "_unlockFade"
to: 0
duration: 300
easing.type: Easing.InCubic
}
NumberAnimation {
target: _hexWave
property: "opacity"
to: 0
duration: 300
easing.type: Easing.InCubic