on xenial help sign in
Add final demo page
b3a4c15Michael Terry
Components/DemoOverlay.qml+3−3
@@ -164,7 +164,7 @@ Item {
164
164
165 SequentialAnimation {
165 SequentialAnimation {
166 id: wholeAnimation
166 id: wholeAnimation
167− running: overlay.active && overlay.edge != "none"
167+ running: overlay.active
168
168
169 ParallelAnimation {
169 ParallelAnimation {
170 id: fadeInAnimation
170 id: fadeInAnimation
@@ -188,7 +188,7 @@ Item {
188 }
188 }
189 }
189 }
190 to: overlay.__edge_margin
190 to: overlay.__edge_margin
191− duration: 1000
191+ duration: overlay.edge == "none" ? 0 : 1000
192 }
192 }
193 StandardAnimation {
193 StandardAnimation {
194 target: labelGroup
194 target: labelGroup
@@ -212,7 +212,7 @@ Item {
212 property string prop: (overlay.edge == "left" || overlay.edge == "right") ? "x" : "y"
212 property string prop: (overlay.edge == "left" || overlay.edge == "right") ? "x" : "y"
213 property double endVal: units.dp(5) * ((overlay.edge == "left" || overlay.edge == "top") ? 1 : -1)
213 property double endVal: units.dp(5) * ((overlay.edge == "left" || overlay.edge == "top") ? 1 : -1)
214 property double maxGlow: units.dp(20)
214 property double maxGlow: units.dp(20)
215− property int duration: 1000
215+ property int duration: overlay.edge == "none" ? 0 : 1000
216
216
217 ParallelAnimation {
217 ParallelAnimation {
218 StandardAnimation { target: hintGroup; property: hintAnimation.prop; from: 0; to: hintAnimation.endVal; duration: hintAnimation.duration }
218 StandardAnimation { target: hintGroup; property: hintAnimation.prop; from: 0; to: hintAnimation.endVal; duration: hintAnimation.duration }
Launcher/Launcher.qml+1
@@ -143,6 +143,7 @@ Item {
143 LauncherPanel {
143 LauncherPanel {
144 id: panel
144 id: panel
145 objectName: "launcherPanel"
145 objectName: "launcherPanel"
146+ enabled: root.available
146 width: root.panelWidth
147 width: root.panelWidth
147 anchors {
148 anchors {
148 top: parent.top
149 top: parent.top
Shell.qml+27−10
@@ -190,7 +190,7 @@ FocusScope {
190 available: !greeter.shown && !lockscreen.shown
190 available: !greeter.shown && !lockscreen.shown
191 hides: [stages, launcher, panel.indicators]
191 hides: [stages, launcher, panel.indicators]
192 shown: disappearingAnimationProgress !== 1.0
192 shown: disappearingAnimationProgress !== 1.0
193− enabled: disappearingAnimationProgress === 0.0 && !leftEdgeDemo.active && !topEdgeDemo.active
193+ enabled: disappearingAnimationProgress === 0.0 && !leftEdgeDemo.active && !topEdgeDemo.active && !finalEdgeDemo.active
194 // FIXME: unfocus all applications when going back to the dash
194 // FIXME: unfocus all applications when going back to the dash
195 onEnabledChanged: {
195 onEnabledChanged: {
196 if (enabled) {
196 if (enabled) {
@@ -258,12 +258,7 @@ FocusScope {
258
258
259 Connections {
259 Connections {
260 target: launcher
260 target: launcher
261− onProgressChanged: {
262− if (leftEdgeDemo.active && launcher.progress >= 1.0) {
263− leftEdgeDemo.enabled = false;
261+ onProgressChanged: if (launcher.progress >= 1.0) leftEdgeDemo.enabled = false
264− shell.hideEdgeDemo();
265− }
266− }
267 }
262 }
268 }
263 }
269 }
264 }
@@ -513,7 +508,7 @@ FocusScope {
513 shell.background = bgPath ? bgPath : defaultBackground
508 shell.background = bgPath ? bgPath : defaultBackground
514 // Update edge demo hint
509 // Update edge demo hint
515 var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole)
510 var user = LightDM.Users.data(uid, LightDM.UserRoles.NameRole)
516− shell.showEdgeDemo = AccountsService.getUserProperty(user, "demo-edges")
511+ shell.showEdgeDemo = true //AccountsService.getUserProperty(user, "demo-edges")
517 }
512 }
518
513
519 onLeftTeaserPressedChanged: {
514 onLeftTeaserPressedChanged: {
@@ -528,6 +523,7 @@ FocusScope {
528 edge: "right"
523 edge: "right"
529 title: i18n.tr("Right edge")
524 title: i18n.tr("Right edge")
530 text: i18n.tr("Try swiping from the right edge to unlock the phone")
525 text: i18n.tr("Try swiping from the right edge to unlock the phone")
526+ skipText: i18n.tr("Finish")
531 anchors.fill: parent
527 anchors.fill: parent
532 visible: shell.showEdgeDemoInGreeter
528 visible: shell.showEdgeDemoInGreeter
533 onSkip: {
529 onSkip: {
@@ -602,7 +598,7 @@ FocusScope {
602 indicatorsMenuWidth: parent.width > units.gu(60) ? units.gu(40) : parent.width
598 indicatorsMenuWidth: parent.width > units.gu(60) ? units.gu(40) : parent.width
603 indicators {
599 indicators {
604 hides: [launcher]
600 hides: [launcher]
605− available: !rightEdgeDemo.active && !leftEdgeDemo.active
601+ available: !rightEdgeDemo.active && !leftEdgeDemo.active && !finalEdgeDemo.active
606 }
602 }
607 fullscreenMode: shell.fullscreenMode
603 fullscreenMode: shell.fullscreenMode
608 searchVisible: !greeter.shown && !lockscreen.shown
604 searchVisible: !greeter.shown && !lockscreen.shown
@@ -695,7 +691,7 @@ FocusScope {
695 anchors.bottom: parent.bottom
691 anchors.bottom: parent.bottom
696 width: parent.width
692 width: parent.width
697 dragAreaWidth: shell.edgeSize
693 dragAreaWidth: shell.edgeSize
698− available: !greeter.shown || greeter.narrowMode && !rightEdgeDemo.active && !topEdgeDemo.active && !bottomEdgeDemo.active
694+ available: (!greeter.shown || greeter.narrowMode) && !rightEdgeDemo.active && !topEdgeDemo.active && !bottomEdgeDemo.active && !finalEdgeDemo.active
699 onDashItemSelected: {
695 onDashItemSelected: {
700 greeter.hide()
696 greeter.hide()
701 // Animate if moving between application and dash
697 // Animate if moving between application and dash
@@ -753,6 +749,27 @@ FocusScope {
753 }
749 }
754 }
750 }
755
751
752+ DemoOverlay {
753+ id: finalEdgeDemo
754+
755+ edge: "none"
756+ title: i18n.tr("Well done")
757+ text: i18n.tr("You have now mastered the edge gestures and can start using the phone")
758+ skipText: i18n.tr("Finish")
759+ anchors.fill: overlay
760+ visible: false
761+ enabled: shell.showEdgeDemo
762+ onSkip: {
763+ launcher.hide();
764+ shell.hideEdgeDemo();
765+ }
766+
767+ Connections {
768+ target: leftEdgeDemo
769+ onActiveChanged: if (!leftEdgeDemo.active) finalEdgeDemo.visible = true
770+ }
771+ }
772+
756 focus: true
773 focus: true
757
774
758 InputFilterArea {
775 InputFilterArea {