on xenial help sign in
Don't use EdgeDragArea on desktop
commitc93ed50bb137f042b790d33567c742fb0e349f33 authorMichael Terry <michael.terry@canonical.com> dateMon 23 Mar 2015, 10:20 (12 years ago) parentd9d489b
3 files changed+24−1
qml/Shell.qml+8 qml/Tutorial/Tutorial.qml+7 qml/Tutorial/TutorialContent.qml+9−1
qml/Shell.qml+8
@@ -591,6 +591,14 @@ Item {
591591 overlay: overlay
592592 edgeSize: shell.edgeSize
593593
594+ // EdgeDragAreas don't work with mice. So to avoid trapping the user,
595+ // we'll tell the tutorial to avoid using them on the Desktop. The
596+ // Desktop doesn't use the same spread design anyway. The tutorial is
597+ // all a bit of a placeholder on non-phone form factors right now.
598+ // When the design team gives us more guidance, we can do something
599+ // more clever here.
600+ useEdgeDragArea: applicationsDisplayLoader.source != Qt.resolvedUrl("Stages/DesktopStage.qml")
601+
594602 onFinished: {
595603 AccountsService.demoEdges = false;
596604 active = false; // for immediate response / if AS is having problems
qml/Tutorial/Tutorial.qml+7
@@ -23,6 +23,7 @@ Item {
2323 property alias active: loader.active
2424 property bool paused
2525 property real edgeSize
26+ property bool useEdgeDragArea
2627
2728 property Item launcher
2829 property Item panel
@@ -60,6 +61,12 @@ Item {
6061 value: root.edgeSize
6162 }
6263
64+ Binding {
65+ target: loader.item
66+ property: "useEdgeDragArea"
67+ value: root.useEdgeDragArea
68+ }
69+
6370 Binding {
6471 target: loader.item
6572 property: "launcher"
qml/Tutorial/TutorialContent.qml+9−1
@@ -34,6 +34,7 @@ Item {
3434
3535 property bool paused: false
3636 property real edgeSize
37+ property bool useEdgeDragArea
3738
3839 signal finished()
3940
@@ -81,10 +82,17 @@ Item {
8182 anchors.fill: parent
8283 textXOffset: root.launcher.panelWidth
8384 paused: !shown || root.paused
85+ text: root.useEdgeDragArea ? i18n.tr("Tap here to continue.") : i18n.tr("Tap here to finish.")
8486
8587 onFinished: {
8688 root.launcher.hide();
87− tutorialRight.show();
89+ if (root.useEdgeDragArea) {
90+ tutorialRight.show();
91+ } else {
92+ // Last two screens use EdgeDragArea (right edge spread and
93+ // bottom edge). So just end tutorial here.
94+ root.finish();
95+ }
8896 }
8997 }
9098