forked from Shinonome/dots-hyprland
waffles: lock: open anim
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user