From ba1c6fda43c44237a4fe5db092d6441eb85ef2dc Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 10 Aug 2025 17:17:51 +1000 Subject: lock: add content + better unlock anim --- modules/lock/LockSurface.qml | 55 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 9 deletions(-) (limited to 'modules/lock/LockSurface.qml') diff --git a/modules/lock/LockSurface.qml b/modules/lock/LockSurface.qml index 7e3f593..3b6b86c 100644 --- a/modules/lock/LockSurface.qml +++ b/modules/lock/LockSurface.qml @@ -15,10 +15,6 @@ WlSessionLockSurface { property bool locked - function unlock(): void { - lock.unlocked = true; - } - Component.onCompleted: locked = true color: "transparent" @@ -40,8 +36,8 @@ WlSessionLockSurface { target: lockBg properties: "implicitWidth,implicitHeight" to: lockBg.size - duration: Appearance.anim.durations.expressiveFastSpatial - easing.bezierCurve: Appearance.anim.curves.expressiveFastSpatial + duration: Appearance.anim.durations.expressiveDefaultSpatial + easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial } Anim { target: lockBg @@ -49,9 +45,31 @@ WlSessionLockSurface { to: lockBg.size / 4 } Anim { - targets: [background, lockBg] + target: content + property: "opacity" + to: 0 + duration: Appearance.anim.durations.small + } + Anim { + target: lockIcon + property: "opacity" + to: 1 + } + Anim { + target: background property: "opacity" to: 0 + duration: Appearance.anim.durations.large + } + SequentialAnimation { + PauseAnimation { + duration: Appearance.anim.durations.small + } + Anim { + target: lockBg + property: "opacity" + to: 0 + } } } PropertyAction { @@ -82,7 +100,7 @@ WlSessionLockSurface { Anim { target: lockBg property: "rotation" - to: 180 + to: 360 duration: Appearance.anim.durations.expressiveFastSpatial easing.bezierCurve: Appearance.anim.curves.standardAccel } @@ -91,9 +109,19 @@ WlSessionLockSurface { Anim { target: lockIcon property: "rotation" - to: 180 + to: 360 easing.bezierCurve: Appearance.anim.curves.standardDecel } + Anim { + target: lockIcon + property: "opacity" + to: 0 + } + Anim { + target: content + property: "opacity" + to: 1 + } Anim { target: lockBg property: "radius" @@ -147,6 +175,7 @@ WlSessionLockSurface { color: Colours.tPalette.m3surface radius: size / 4 + rotation: 180 scale: 0 Elevation { @@ -164,6 +193,14 @@ WlSessionLockSurface { text: "lock" font.pointSize: Appearance.font.size.extraLarge * 4 font.bold: true + rotation: 180 + } + + Content { + id: content + + lock: root + opacity: 0 } } -- cgit v1.2.3-freya