on xenial help sign in
Don't let tutorial grow launcher past its own width
e059c2fMichael Terry
qml/Tutorial/TutorialLeft.qml+11−4
@@ -49,21 +49,28 @@ TutorialPage {
49 paused: running && root.paused
49 paused: running && root.paused
50 running: !slider.active && root.launcher.visibleWidth === 0 && root.shown
50 running: !slider.active && root.launcher.visibleWidth === 0 && root.shown
51 loops: Animation.Infinite
51 loops: Animation.Infinite
52+ property real bounce: 0
52
53
53 UbuntuNumberAnimation {
54 UbuntuNumberAnimation {
54− target: root.launcher
55+ target: teaseAnimation
55− property: "x"
56+ property: "bounce"
56 to: units.gu(2)
57 to: units.gu(2)
57 duration: UbuntuAnimation.SleepyDuration
58 duration: UbuntuAnimation.SleepyDuration
58 }
59 }
59 UbuntuNumberAnimation {
60 UbuntuNumberAnimation {
60− target: root.launcher
61+ target: teaseAnimation
61− property: "x"
62+ property: "bounce"
62 to: 0
63 to: 0
63 duration: UbuntuAnimation.SleepyDuration
64 duration: UbuntuAnimation.SleepyDuration
64 }
65 }
65 }
66 }
66
67
68+ Binding {
69+ target: root.launcher
70+ property: "x"
71+ value: Math.min(root.launcher.panelWidth - root.launcher.visibleWidth, teaseAnimation.bounce)
72+ }
73+
67 Timer {
74 Timer {
68 id: finishTimer
75 id: finishTimer
69 interval: 1
76 interval: 1