on xenial help sign in
Fix an issue in Tutorial
a7e9646Daniel d'Andrada
qml/Stages/TabletStage.qml+4
@@ -27,8 +27,12 @@ AbstractStage {
27 objectName: "stages"
27 objectName: "stages"
28 anchors.fill: parent
28 anchors.fill: parent
29
29
30+ // <tutorial-hacks> The Tutorial looks into our implementation details
30 property alias sideStageVisible: spreadView.sideStageVisible
31 property alias sideStageVisible: spreadView.sideStageVisible
31 property alias sideStageWidth: spreadView.sideStageWidth
32 property alias sideStageWidth: spreadView.sideStageWidth
33+ // The stage the currently focused surface is in
34+ property int stageFocusedSurface: priv.focusedAppDelegate ? priv.focusedAppDelegate.stage : ApplicationInfoInterface.MainStage
35+ // </tutorial-hacks>
32
36
33 // Functions to be called from outside
37 // Functions to be called from outside
34 function updateFocusedAppOrientation() {
38 function updateFocusedAppOrientation() {
qml/Tutorial/TutorialBottom.qml+1−1
@@ -47,7 +47,7 @@ TutorialPage {
47 readonly property real sideStageWidth: root.usageScenario === "tablet" && stage.sideStageVisible ?
47 readonly property real sideStageWidth: root.usageScenario === "tablet" && stage.sideStageVisible ?
48 stage.sideStageWidth : 0
48 stage.sideStageWidth : 0
49 readonly property bool isMainStageApp: usageScenario !== "tablet" ||
49 readonly property bool isMainStageApp: usageScenario !== "tablet" ||
50− application.stage === ApplicationInfoInterface.MainStage
50+ stage.stageFocusedSurface === ApplicationInfoInterface.MainStage
51 readonly property real dragAreaHeight: units.gu(3) // based on PageWithBottomEdge.qml
51 readonly property real dragAreaHeight: units.gu(3) // based on PageWithBottomEdge.qml
52 readonly property real targetDistance: height * 0.2 + dragAreaHeight // based on PageWithBottomEdge.qml
52 readonly property real targetDistance: height * 0.2 + dragAreaHeight // based on PageWithBottomEdge.qml
53
53
tests/qmltests/Tutorial/tst_Tutorial.qml+4
@@ -113,6 +113,8 @@ Rectangle {
113 sourceComponent: Component {
113 sourceComponent: Component {
114 Shell {
114 Shell {
115 usageScenario: shellLoader.state
115 usageScenario: shellLoader.state
116+ nativeWidth: width
117+ nativeHeight: height
116 property string indicatorProfile: "phone"
118 property string indicatorProfile: "phone"
117 orientation: shellLoader.shellOrientation
119 orientation: shellLoader.shellOrientation
118 orientations: Orientations {
120 orientations: Orientations {
@@ -401,6 +403,8 @@ Rectangle {
401
403
402 var launcher = findChild(shell, "launcher");
404 var launcher = findChild(shell, "launcher");
403 var tutorialLeft = findChild(shell, "tutorialLeftLoader");
405 var tutorialLeft = findChild(shell, "tutorialLeftLoader");
406+ verify(tutorialLeft);
407+
404 touchFlick(shell, 0, halfHeight, shell.width, halfHeight);
408 touchFlick(shell, 0, halfHeight, shell.width, halfHeight);
405
409
406 tryCompare(tutorialLeft, "shown", false);
410 tryCompare(tutorialLeft, "shown", false);