latch lock screen animations after first wave completes
This commit is contained in:
parent
570000f09a
commit
a7d104df64
3 changed files with 23 additions and 5 deletions
|
|
@ -10,8 +10,12 @@ Item {
|
||||||
|
|
||||||
readonly property real _fontSize: Math.max(48, screenHeight * 0.28)
|
readonly property real _fontSize: Math.max(48, screenHeight * 0.28)
|
||||||
|
|
||||||
// Appear as wave reaches the clock (left edge)
|
// Appear as wave reaches the clock (left edge), latch once fully revealed
|
||||||
readonly property real _progress: Math.max(0, Math.min(1, wavePhase / 300)) * unlockFade
|
property bool _revealed: false
|
||||||
|
on_RawProgressChanged: if (_rawProgress >= 1)
|
||||||
|
_revealed = true
|
||||||
|
readonly property real _rawProgress: Math.max(0, Math.min(1, wavePhase / 300))
|
||||||
|
readonly property real _progress: (_revealed ? 1 : _rawProgress) * unlockFade
|
||||||
opacity: _progress
|
opacity: _progress
|
||||||
property real _slideX: (1 - _progress) * -80
|
property real _slideX: (1 - _progress) * -80
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,13 +28,23 @@ WlSessionLockSurface {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
opacity: _unlockFade
|
opacity: _unlockFade
|
||||||
|
|
||||||
layer.enabled: true
|
property bool _revealed: false
|
||||||
|
|
||||||
|
layer.enabled: !_revealed
|
||||||
layer.effect: ShaderEffect {
|
layer.effect: ShaderEffect {
|
||||||
property real uPhase: _hexWave.wavePhase
|
property real uPhase: _hexWave.wavePhase
|
||||||
property real uWidth: root.width
|
property real uWidth: root.width
|
||||||
fragmentShader: Quickshell.shellPath("modules/reveal_mask.frag.qsb")
|
fragmentShader: Quickshell.shellPath("modules/reveal_mask.frag.qsb")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: _hexWave
|
||||||
|
function onWavePhaseChanged() {
|
||||||
|
if (!parent._revealed && _hexWave.wavePhase >= root.width)
|
||||||
|
parent._revealed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Blurred screenshot
|
// Blurred screenshot
|
||||||
ScreencopyView {
|
ScreencopyView {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,12 @@ Item {
|
||||||
property real screenWidth: 0
|
property real screenWidth: 0
|
||||||
property real unlockFade: 1
|
property real unlockFade: 1
|
||||||
|
|
||||||
// Fly in when wave exits the right edge
|
// Fly in when wave exits the right edge, latch once fully revealed
|
||||||
readonly property real _progress: (screenWidth > 0 ? Math.max(0, Math.min(1, (wavePhase - screenWidth) / 500)) : 0) * unlockFade
|
property bool _revealed: false
|
||||||
|
on_RawProgressChanged: if (_rawProgress >= 1)
|
||||||
|
_revealed = true
|
||||||
|
readonly property real _rawProgress: screenWidth > 0 ? Math.max(0, Math.min(1, (wavePhase - screenWidth) / 500)) : 0
|
||||||
|
readonly property real _progress: (_revealed ? 1 : _rawProgress) * unlockFade
|
||||||
opacity: _progress
|
opacity: _progress
|
||||||
property real _slideX: (1 - _progress) * 80
|
property real _slideX: (1 - _progress) * 80
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue