on xenial help sign in
After finishing hiding, put the greeter back on the left for reliably showing
commit42f496c9d377d2f1488c93dd601d47995edd4972 authorMichael Terry <michael.terry@canonical.com> dateWed 16 Apr 2014, 09:43 (13 years ago) parent8022b45
1 file changed+11−5
qml/Greeter/Greeter.qml+11−5
qml/Greeter/Greeter.qml+11−5
@@ -50,14 +50,20 @@ Showable {
5050 signal tease()
5151
5252 function hideRight() {
53− hideAnimation = __rightHideAnimation
54− hide()
53+ if (shown) {
54+ hideAnimation = __rightHideAnimation
55+ hide()
56+ }
5557 }
5658
57− Connections {
58− target: __rightHideAnimation
59+ onRequiredChanged: {
5960 // Reset hide animation to default once we're finished with it
60− onRunningChanged: if (!__rightHideAnimation.running) greeter.hideAnimation = __leftHideAnimation
61+ if (!required) {
62+ // Put back on left for reliable show direction and so that
63+ // if normal hide() is called, we don't animate from right.
64+ x = -width
65+ hideAnimation = __leftHideAnimation
66+ }
6167 }
6268
6369 // Bi-directional revealer