forked from Shinonome/dots-hyprland
waffles: lock: open anim
This commit is contained in:
@@ -92,7 +92,6 @@ Scope {
|
||||
WlSessionLock {
|
||||
id: lock
|
||||
locked: GlobalStates.screenLocked
|
||||
|
||||
surface: root.sessionLockSurface
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user