on xenial help sign in
After finishing hiding, put the greeter back on the left for reliably showing
42f496cMichael Terry
qml/Greeter/Greeter.qml+11−5
@@ -50,14 +50,20 @@ Showable {
50 signal tease()
50 signal tease()
51
51
52 function hideRight() {
52 function hideRight() {
53+ if (shown) {
53− hideAnimation = __rightHideAnimation
54+ hideAnimation = __rightHideAnimation
54− hide()
55+ hide()
56+ }
55 }
57 }
56
58
57− Connections {
59+ onRequiredChanged: {
58− target: __rightHideAnimation
59 // Reset hide animation to default once we're finished with it
60 // Reset hide animation to default once we're finished with it
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
60− onRunningChanged: if (!__rightHideAnimation.running) greeter.hideAnimation = __leftHideAnimation
65+ hideAnimation = __leftHideAnimation
66+ }
61 }
67 }
62
68
63 // Bi-directional revealer
69 // Bi-directional revealer