@@ -27,6 +27,9 @@ AbstractStage {
2727 objectName: "stages"
2828 anchors.fill: parent
2929
30+ property bool sideStageVisible: priv.sideStageAppId
31+ property real sideStageWidth: units.gu(40)
32+
3033 // Functions to be called from outside
3134 function updateFocusedAppOrientation() {
3235 var mainStageAppIndex = priv.indexOf(priv.mainStageAppId);
@@ -71,6 +74,7 @@ AbstractStage {
7174 }
7275
7376 orientationChangesEnabled: priv.mainAppOrientationChangesEnabled
77+ dragProgress: spreadRepeater.count > 0 ? spreadRepeater.itemAt(0).animatedProgress : 0
7478
7579 onWidthChanged: {
7680 spreadView.selectedIndex = -1;
@@ -233,8 +237,6 @@ AbstractStage {
233237 contentX: -shift
234238
235239 property int tileDistance: units.gu(20)
236− property int sideStageWidth: units.gu(40)
237− property bool sideStageVisible: priv.sideStageAppId
238240
239241 // This indicates when the spreadView is active. That means, all the animations
240242 // are activated and tiles need to line up for the spread.
@@ -254,14 +256,14 @@ AbstractStage {
254256 // 2: The list is dragged further and snaps into the spread view when entering phase 2
255257 property int phase
256258
257− readonly property int phase0Width: sideStageWidth
258− readonly property int phase1Width: sideStageWidth
259+ readonly property int phase0Width: root.sideStageWidth
260+ readonly property int phase1Width: root.sideStageWidth
259261
260262 // Those markers mark the various positions in the spread (ratio to screen width from right to left):
261263 // 0 - 1: following finger, snap back to the beginning on release
262264 readonly property real positionMarker1: 0.2
263265 // 1 - 2: curved snapping movement, snap to nextInStack on release
264− readonly property real positionMarker2: sideStageWidth / spreadView.width
266+ readonly property real positionMarker2: root.sideStageWidth / spreadView.width
265267 // 2 - 3: movement follows finger, snaps to phase 2 (full spread) on release
266268 readonly property real positionMarker3: 0.6
267269 // passing 3, we detach movement from the finger and snap to phase 2 (full spread)
@@ -490,7 +492,7 @@ AbstractStage {
490492 Rectangle {
491493 id: sideStageBackground
492494 color: "black"
493− width: spreadView.sideStageWidth * (1 - sideStageDragHandle.progress)
495+ width: root.sideStageWidth * (1 - sideStageDragHandle.progress)
494496 height: priv.landscapeHeight
495497 x: spreadView.width - width
496498 z: spreadView.indexToZIndex(priv.indexOf(priv.sideStageAppId))
@@ -505,16 +507,16 @@ AbstractStage {
505507 width: units.gu(2)
506508 height: priv.landscapeHeight
507509 z: sideStageBackground.z
508− opacity: spreadView.phase <= 0 && spreadView.sideStageVisible ? 1 : 0
510+ opacity: spreadView.phase <= 0 && root.sideStageVisible ? 1 : 0
509511 property real progress: 0
510512 property bool dragging: false
511513
512514 Behavior on opacity { UbuntuNumberAnimation {} }
513515
514516 Connections {
515− target: spreadView
517+ target: root
516518 onSideStageVisibleChanged: {
517− if (spreadView.sideStageVisible) {
519+ if (root.sideStageVisible) {
518520 sideStageDragHandle.progress = 0;
519521 }
520522 }
@@ -546,7 +548,7 @@ AbstractStage {
546548 onMouseXChanged: {
547549 totalDiff += mouseX - startX;
548550 if (priv.mainStageAppId) {
549− sideStageDragHandle.progress = Math.max(0, totalDiff / spreadView.sideStageWidth);
551+ sideStageDragHandle.progress = Math.max(0, totalDiff / root.sideStageWidth);
550552 }
551553 gesturePoints.push(mouseX);
552554 }
@@ -586,7 +588,7 @@ AbstractStage {
586588 if (wantsMainStage) {
587589 return spreadView.width;
588590 } else {
589− return spreadView.sideStageWidth;
591+ return root.sideStageWidth;
590592 }
591593 }
592594 height: {