waffles: lock: open anim

This commit is contained in:
end-4
2025-12-15 00:31:22 +01:00
parent 60b2225cc6
commit 36ff18bfe3
2 changed files with 43 additions and 6 deletions
@@ -92,7 +92,6 @@ Scope {
WlSessionLock { WlSessionLock {
id: lock id: lock
locked: GlobalStates.screenLocked locked: GlobalStates.screenLocked
surface: root.sessionLockSurface surface: root.sessionLockSurface
} }
@@ -36,15 +36,34 @@ LockScreen {
Image { Image {
id: bg id: bg
z: 0 z: 0
anchors.fill: parent width: parent.width
height: parent.height
onStatusChanged: {
if (status === Image.Ready) {
print("Lock wallpaper loaded");
print(lockSurfaceItem.height);
y = -lockSurfaceItem.height;
openAnim.restart();
}
}
sourceSize: Qt.size(lockSurfaceItem.width, lockSurfaceItem.height) sourceSize: Qt.size(lockSurfaceItem.width, lockSurfaceItem.height)
source: Config.options.background.wallpaperPath source: Config.options.background.wallpaperPath
fillMode: Image.PreserveAspectCrop fillMode: Image.PreserveAspectCrop
PropertyAnimation {
id: openAnim
target: bg
property: "y"
to: 0
duration: 350
easing.type: Easing.BezierSpline
easing.bezierCurve: Looks.transition.easing.bezierCurve.easeIn
}
} }
GaussianBlur { GaussianBlur {
z: 1 z: 1
anchors.fill: parent anchors.fill: bg
source: bg source: bg
radius: 100 radius: 100
samples: radius * 2 + 1 samples: radius * 2 + 1
@@ -67,7 +86,7 @@ LockScreen {
Interactables { Interactables {
id: interactables id: interactables
z: 2 z: 2
anchors.fill: parent anchors.fill: bg
} }
} }
@@ -83,12 +102,31 @@ LockScreen {
// } // }
function switchToFocusedView() { function switchToFocusedView() {
root.passwordView = true; switchToPasswordViewAnim.restart();
}
SequentialAnimation {
id: switchToPasswordViewAnim
PropertyAnimation {
target: unfocusedContent
property: "y"
from: 0
to: -height * 1.1
duration: 250
easing.type: Easing.BezierSpline
easing.bezierCurve: Looks.transition.easing.bezierCurve.easeIn
}
ScriptAction {
script: {
root.passwordView = true;
}
}
} }
Item { Item {
id: unfocusedContent id: unfocusedContent
anchors.fill: parent width: parent.width
height: parent.height
visible: !root.passwordView visible: !root.passwordView
ClockTextGroup { ClockTextGroup {
anchors { anchors {