aboutsummaryrefslogtreecommitdiffstats
path: root/theme
diff options
context:
space:
mode:
Diffstat (limited to 'theme')
-rw-r--r--theme/Main.qml1
-rw-r--r--theme/components/LoginCard.qml5
2 files changed, 4 insertions, 2 deletions
diff --git a/theme/Main.qml b/theme/Main.qml
index a813d6c..63cb6ea 100644
--- a/theme/Main.qml
+++ b/theme/Main.qml
@@ -106,6 +106,7 @@ Item {
LoginCard {
id: card
anchors.centerIn: parent
+ anchors.horizontalCenterOffset: card.shakeOffset
visible: root.cardScreen
enabled: root.uiVisible
opacity: root.uiVisible ? 1 : 0
diff --git a/theme/components/LoginCard.qml b/theme/components/LoginCard.qml
index d76269f..e743142 100644
--- a/theme/components/LoginCard.qml
+++ b/theme/components/LoginCard.qml
@@ -18,8 +18,9 @@ Item {
readonly property int radius: 10
signal wake()
- // Shake on a failed login without touching the card's own x binding, which
- // Main owns: animating x directly would destroy that binding.
+ // Shake on a failed login. Main reads this as the card's
+ // anchors.horizontalCenterOffset, so the shake never touches the card's
+ // own position bindings.
property real shakeOffset: 0
implicitWidth: 380