on xenial help sign in
Add tease to bottom edge slider
commita8558bcecf5f8b20ac5f89ce54f695ea21177263 authorMichael Terry <michael.terry@canonical.com> dateSun 1 Feb 2015, 17:39 (12 years ago) parente27065e
1 file changed+25−2
qml/Tutorial/TutorialBottom.qml+25−2
qml/Tutorial/TutorialBottom.qml+25−2
@@ -29,6 +29,26 @@ TutorialPage {
2929 text: i18n.tr("Swipe up from the bottom edge.")
3030 fullTextWidth: true
3131
32+ SequentialAnimation {
33+ id: teaseAnimation
34+ paused: running && root.paused
35+ running: !dragArea.useTouchY && slider.dragOffset === 0
36+ loops: Animation.Infinite
37+
38+ UbuntuNumberAnimation {
39+ target: slider
40+ property: "teaseOffset"
41+ to: units.gu(1)
42+ duration: UbuntuAnimation.SleepyDuration
43+ }
44+ UbuntuNumberAnimation {
45+ target: slider
46+ property: "teaseOffset"
47+ to: 0
48+ duration: UbuntuAnimation.SleepyDuration
49+ }
50+ }
51+
3252 foreground {
3353 children: [
3454 LocalComponents.Slider {
@@ -39,10 +59,13 @@ TutorialPage {
3959 horizontalCenter: parent.horizontalCenter
4060 }
4161 rotation: -90
42− offset: dragArea.useTouchY ? -dragArea.touchY : 0
62+ offset: teaseOffset + dragOffset
4363 active: dragArea.dragging
4464
45− Behavior on offset {
65+ property real teaseOffset
66+ property real dragOffset: dragArea.useTouchY ? -dragArea.touchY : 0
67+
68+ Behavior on dragOffset {
4669 id: offsetAnimation
4770 UbuntuNumberAnimation {}
4871 }