Tweak lockscreen animation durations to be more fluid

This commit is contained in:
Devin Lin 2021-03-17 18:07:31 -04:00
parent ba8a8cd9bb
commit e9f5e43970

View file

@ -99,6 +99,7 @@ Rectangle {
} }
function onFailed() { function onFailed() {
root.password = ""; root.password = "";
passwordChanged();
pinLabel = qsTr("Wrong PIN"); pinLabel = qsTr("Wrong PIN");
keypadRoot.waitingForAuth = false; keypadRoot.waitingForAuth = false;
} }
@ -207,6 +208,7 @@ Rectangle {
Component.onCompleted: { Component.onCompleted: {
if (showChar) { if (showChar) {
charAnimation.to = 1; charAnimation.to = 1;
charAnimation.duration = 75;
charAnimation.restart(); charAnimation.restart();
} else { } else {
dotAnimation.to = 1; dotAnimation.to = 1;
@ -217,9 +219,10 @@ Rectangle {
onShowCharChanged: { onShowCharChanged: {
if (!showChar) { if (!showChar) {
charAnimation.to = 0; charAnimation.to = 0;
charAnimation.duration = 50;
charAnimation.restart(); charAnimation.restart();
dotAnimation.to = 1; dotAnimation.to = 1;
dotAnimation.restart(); dotAnimation.start();
} }
} }
@ -234,7 +237,7 @@ Rectangle {
id: dotAnimation id: dotAnimation
target: dot; target: dot;
property: "scale"; property: "scale";
duration: 200 duration: 50
} }
} }
@ -250,7 +253,6 @@ Rectangle {
id: charAnimation id: charAnimation
target: charLabel; target: charLabel;
property: "scale"; property: "scale";
duration: 150;
} }
} }
} }