on xenial help sign in
hide screen on long press not click; minor fixes for now
4c306d9Michael Terry
qml/Tutorial/TutorialBottom.qml+3−2
@@ -16,6 +16,7 @@
16
16
17import QtQuick 2.4
17import QtQuick 2.4
18import Ubuntu.Components 1.3
18import Ubuntu.Components 1.3
19+import Ubuntu.Gestures 0.1
19import "." as LocalComponents
20import "." as LocalComponents
20
21
21TutorialPage {
22TutorialPage {
@@ -44,11 +45,11 @@ TutorialPage {
44 width: root.width - units.gu(8)
45 width: root.width - units.gu(8)
45 }
46 }
46
47
47− DirectionalDragArea {
48+ /*DirectionalDragArea {
48 direction: Direction.Upwards
49 direction: Direction.Upwards
49 anchors.left: parent.left
50 anchors.left: parent.left
50 anchors.right: parent.right
51 anchors.right: parent.right
51 anchors.bottom: parent.bottom
52 anchors.bottom: parent.bottom
52 height: units.gu(1)
53 height: units.gu(1)
53− }
54+ }*/
54}
55}
qml/Tutorial/TutorialContent.qml+16−21
@@ -29,7 +29,10 @@ Item {
29 readonly property bool launcherEnabled: !running || tutorialLeft.shown
29 readonly property bool launcherEnabled: !running || tutorialLeft.shown
30 readonly property bool spreadEnabled: !running || tutorialRight.shown
30 readonly property bool spreadEnabled: !running || tutorialRight.shown
31 readonly property bool panelEnabled: !running || tutorialTop.shown
31 readonly property bool panelEnabled: !running || tutorialTop.shown
32− readonly property alias running: d.running
32+ readonly property alias running: tutorialLeft.shown
33+ || tutorialTop.shown
34+ || tutorialRight.shown
35+ || tutorialBottom.shown
33
36
34 signal finished()
37 signal finished()
35
38
@@ -39,12 +42,6 @@ Item {
39
42
40 ////
43 ////
41
44
42− QtObject {
43− id: d
44−
45− property bool running: tutorialLeft.shown || tutorialTop.shown || tutorialRight.shown || tutorialBottom.shown
46− }
47−
48 TutorialLeft {
45 TutorialLeft {
49 id: tutorialLeft
46 id: tutorialLeft
50 objectName: "tutorialLeft"
47 objectName: "tutorialLeft"
@@ -52,13 +49,11 @@ Item {
52 launcher: root.launcher
49 launcher: root.launcher
53 hides: [launcher, panel.indicators]
50 hides: [launcher, panel.indicators]
54
51
55− function showIfReady() {
52+ function isReady() {
56− if (AccountsService.demoEdgesCompleted.indexOf("left") == -1) {
53+ return AccountsService.demoEdgesCompleted.indexOf("left") == -1;
57− show();
58− }
59 }
54 }
60
55
61− Component.onCompleted: showIfReady()
56+ Component.onCompleted: if (parent.isReady()) show()
62 onFinished: AccountsService.markDemoEdgeCompleted("left")
57 onFinished: AccountsService.markDemoEdgeCompleted("left")
63 }
58 }
64
59
@@ -77,15 +72,15 @@ Item {
77 Timer {
72 Timer {
78 id: tutorialTopTimer
73 id: tutorialTopTimer
79 interval: 60000
74 interval: 60000
80− onTriggered: if (isReady()) tutorialTop.show()
75+ onTriggered: if (parent.isReady()) tutorialTop.show()
81 }
76 }
82
77
83 Connections {
78 Connections {
84 target: AccountsService
79 target: AccountsService
85− onDemoEdgesCompletedChanged: if (isReady()) tutorialTopTimer.start()
80+ onDemoEdgesCompletedChanged: if (parent.isReady()) tutorialTopTimer.start()
86 }
81 }
87
82
88− Component.onCompleted: if (isReady()) tutorialTopTimer.start()
83+ Component.onCompleted: if (parent.isReady()) tutorialTopTimer.start()
89 onFinished: AccountsService.markDemoEdgeCompleted("top")
84 onFinished: AccountsService.markDemoEdgeCompleted("top")
90
85
91 Connections {
86 Connections {
@@ -115,17 +110,17 @@ Item {
115 Timer {
110 Timer {
116 id: tutorialRightTimer
111 id: tutorialRightTimer
117 interval: 3000
112 interval: 3000
118− onTriggered: if (isReady()) tutorialRight.show()
113+ onTriggered: if (parent.isReady()) tutorialRight.show()
119 }
114 }
120
115
121 Connections {
116 Connections {
122 target: AccountsService
117 target: AccountsService
123− onDemoEdgesCompletedChanged: if (isReady()) tutorialRightTimer.start()
118+ onDemoEdgesCompletedChanged: if (parent.isReady()) tutorialRightTimer.start()
124 }
119 }
125
120
126 Connections {
121 Connections {
127 target: ApplicationManager
122 target: ApplicationManager
128− onApplicationAdded: if (isReady()) tutorialRight.show()
123+ onApplicationAdded: if (parent.isReady()) tutorialRight.show()
129 }
124 }
130
125
131 onFinished: AccountsService.markDemoEdgeCompleted("right")
126 onFinished: AccountsService.markDemoEdgeCompleted("right")
@@ -162,17 +157,17 @@ Item {
162 Timer {
157 Timer {
163 id: tutorialBottomTimer
158 id: tutorialBottomTimer
164 interval: 3000
159 interval: 3000
165− onTriggered: if (isReady()) tutorialBottom.show()
160+ onTriggered: if (parent.isReady()) tutorialBottom.show()
166 }
161 }
167
162
168 Connections {
163 Connections {
169 target: AccountsService
164 target: AccountsService
170− onDemoEdgesCompletedChanged: if (isReady()) tutorialBottomTimer.start()
165+ onDemoEdgesCompletedChanged: if (parent.isReady()) tutorialBottomTimer.start()
171 }
166 }
172
167
173 Connections {
168 Connections {
174 target: ApplicationManager
169 target: ApplicationManager
175− onFocusedApplicationIdChanged: if (isReady()) tutorialBottom.show()
170+ onFocusedApplicationIdChanged: if (parent.isReady()) tutorialBottom.show()
176 }
171 }
177
172
178 onFinished: {
173 onFinished: {
qml/Tutorial/TutorialPage.qml+1−1
@@ -59,7 +59,7 @@ Showable {
59 MouseArea { // eat any errant presses
59 MouseArea { // eat any errant presses
60 id: mouseArea
60 id: mouseArea
61 anchors.fill: parent
61 anchors.fill: parent
62− onClicked: root.hide()
62+ onPressAndHold: root.hide()
63 }
63 }
64
64
65 Image {
65 Image {