forked from Shinonome/dots-hyprland
lock: fix wrong password shake fricks up text field placement (#2368)
This commit is contained in:
@@ -119,6 +119,7 @@ MouseArea {
|
|||||||
|
|
||||||
ToolbarTextField {
|
ToolbarTextField {
|
||||||
id: passwordBox
|
id: passwordBox
|
||||||
|
Layout.rightMargin: -Layout.leftMargin
|
||||||
placeholderText: GlobalStates.screenUnlockFailed ? Translation.tr("Incorrect password") : Translation.tr("Enter password")
|
placeholderText: GlobalStates.screenUnlockFailed ? Translation.tr("Incorrect password") : Translation.tr("Enter password")
|
||||||
|
|
||||||
// Style
|
// Style
|
||||||
@@ -156,11 +157,11 @@ MouseArea {
|
|||||||
// Shake when wrong password
|
// Shake when wrong password
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
id: wrongPasswordShakeAnim
|
id: wrongPasswordShakeAnim
|
||||||
NumberAnimation { target: passwordBox; property: "x"; to: -30; duration: 50 }
|
NumberAnimation { target: passwordBox; property: "Layout.leftMargin"; to: -30; duration: 50 }
|
||||||
NumberAnimation { target: passwordBox; property: "x"; to: 30; duration: 50 }
|
NumberAnimation { target: passwordBox; property: "Layout.leftMargin"; to: 30; duration: 50 }
|
||||||
NumberAnimation { target: passwordBox; property: "x"; to: -15; duration: 40 }
|
NumberAnimation { target: passwordBox; property: "Layout.leftMargin"; to: -15; duration: 40 }
|
||||||
NumberAnimation { target: passwordBox; property: "x"; to: 15; duration: 40 }
|
NumberAnimation { target: passwordBox; property: "Layout.leftMargin"; to: 15; duration: 40 }
|
||||||
NumberAnimation { target: passwordBox; property: "x"; to: 0; duration: 30 }
|
NumberAnimation { target: passwordBox; property: "Layout.leftMargin"; to: 0; duration: 30 }
|
||||||
}
|
}
|
||||||
Connections {
|
Connections {
|
||||||
target: GlobalStates
|
target: GlobalStates
|
||||||
|
|||||||
Reference in New Issue
Block a user