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
@@ -36,15 +36,34 @@ LockScreen {
Image {
id: bg
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)
source: Config.options.background.wallpaperPath
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 {
z: 1
anchors.fill: parent
anchors.fill: bg
source: bg
radius: 100
samples: radius * 2 + 1
@@ -67,7 +86,7 @@ LockScreen {
Interactables {
id: interactables
z: 2
anchors.fill: parent
anchors.fill: bg
}
}
@@ -83,12 +102,31 @@ LockScreen {
// }
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 {
id: unfocusedContent
anchors.fill: parent
width: parent.width
height: parent.height
visible: !root.passwordView
ClockTextGroup {
anchors {