From b8789c67f4b3c2dd62ccc2330725797660cc78c5 Mon Sep 17 00:00:00 2001 From: Damocles Date: Wed, 22 Apr 2026 21:31:10 +0200 Subject: [PATCH] lock screen: show clock and widgets immediately when reducedMotion --- shell/lock/LockClock.qml | 5 +++-- shell/lock/LockWidgets.qml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/shell/lock/LockClock.qml b/shell/lock/LockClock.qml index 279bb2b..05d0b40 100644 --- a/shell/lock/LockClock.qml +++ b/shell/lock/LockClock.qml @@ -10,11 +10,12 @@ Item { readonly property real _fontSize: Math.max(48, screenHeight * 0.28) - // Appear as wave reaches the clock (left edge), latch once fully revealed + // Appear as wave reaches the clock (left edge), latch once fully revealed. + // With reducedMotion the wave never runs, so show immediately. 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 _rawProgress: S.Theme.reducedMotion ? 1 : Math.max(0, Math.min(1, wavePhase / 300)) readonly property real _progress: (_revealed ? 1 : _rawProgress) * unlockFade opacity: _progress property real _slideX: (1 - _progress) * -80 diff --git a/shell/lock/LockWidgets.qml b/shell/lock/LockWidgets.qml index 516a145..90f105b 100644 --- a/shell/lock/LockWidgets.qml +++ b/shell/lock/LockWidgets.qml @@ -12,11 +12,12 @@ Item { property real screenWidth: 0 property real unlockFade: 1 - // Fly in when wave exits the right edge, latch once fully revealed + // Fly in when wave exits the right edge, latch once fully revealed. + // With reducedMotion the wave never runs, so show immediately. 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 _rawProgress: S.Theme.reducedMotion ? 1 : (screenWidth > 0 ? Math.max(0, Math.min(1, (wavePhase - screenWidth) / 500)) : 0) readonly property real _progress: (_revealed ? 1 : _rawProgress) * unlockFade opacity: _progress property real _slideX: (1 - _progress) * 80