on xenial help sign in
Add tease to bottom edge slider
a8558bcMichael Terry
qml/Tutorial/TutorialBottom.qml+25−2
@@ -29,6 +29,26 @@ TutorialPage {
29 text: i18n.tr("Swipe up from the bottom edge.")
29 text: i18n.tr("Swipe up from the bottom edge.")
30 fullTextWidth: true
30 fullTextWidth: true
31
31
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+
32 foreground {
52 foreground {
33 children: [
53 children: [
34 LocalComponents.Slider {
54 LocalComponents.Slider {
@@ -39,10 +59,13 @@ TutorialPage {
39 horizontalCenter: parent.horizontalCenter
59 horizontalCenter: parent.horizontalCenter
40 }
60 }
41 rotation: -90
61 rotation: -90
42− offset: dragArea.useTouchY ? -dragArea.touchY : 0
62+ offset: teaseOffset + dragOffset
43 active: dragArea.dragging
63 active: dragArea.dragging
44
64
65+ property real teaseOffset
66+ property real dragOffset: dragArea.useTouchY ? -dragArea.touchY : 0
67+
45− Behavior on offset {
68+ Behavior on dragOffset {
46 id: offsetAnimation
69 id: offsetAnimation
47 UbuntuNumberAnimation {}
70 UbuntuNumberAnimation {}
48 }
71 }