forked from Shinonome/dots-hyprland
Small animation for quickshell lock (#2304)
This commit is contained in:
@@ -143,7 +143,7 @@ MouseArea {
|
|||||||
Keys.onPressed: event => {
|
Keys.onPressed: event => {
|
||||||
root.context.resetClearTimer();
|
root.context.resetClearTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: OpacityMask {
|
layer.effect: OpacityMask {
|
||||||
maskSource: Rectangle {
|
maskSource: Rectangle {
|
||||||
@@ -153,6 +153,22 @@ MouseArea {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Shake when wrong password
|
||||||
|
SequentialAnimation {
|
||||||
|
id: wrongPasswordShakeAnim
|
||||||
|
NumberAnimation { target: passwordBox; property: "x"; to: -30; duration: 50 }
|
||||||
|
NumberAnimation { target: passwordBox; property: "x"; to: 30; duration: 50 }
|
||||||
|
NumberAnimation { target: passwordBox; property: "x"; to: -15; duration: 40 }
|
||||||
|
NumberAnimation { target: passwordBox; property: "x"; to: 15; duration: 40 }
|
||||||
|
NumberAnimation { target: passwordBox; property: "x"; to: 0; duration: 30 }
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: GlobalStates
|
||||||
|
function onScreenUnlockFailedChanged() {
|
||||||
|
if (GlobalStates.screenUnlockFailed) wrongPasswordShakeAnim.restart();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// We're drawing dots manually
|
// We're drawing dots manually
|
||||||
color: ColorUtils.transparentize(Appearance.colors.colOnLayer1)
|
color: ColorUtils.transparentize(Appearance.colors.colOnLayer1)
|
||||||
PasswordChars {
|
PasswordChars {
|
||||||
|
|||||||
Reference in New Issue
Block a user