@@ -53,18 +53,18 @@ FocusScope {
5353 property real leftEdgeDragProgress: 0
5454
5555 // Used by the tutorial code
56− readonly property bool spreadShown: state == "spread"
57− readonly property real rightEdgeDragProgress: rightEdgeDragArea.progress // How far left the stage has been dragged
56+ readonly property real rightEdgeDragProgress: rightEdgeDragArea.dragging ? rightEdgeDragArea.progress : 0 // How far left the stage has been dragged
5857
5958 // used by the snap windows (edge maximize) feature
6059 readonly property alias previewRectangle: fakeRectangle
6160
61+ readonly property bool spreadShown: state == "spread"
6262 readonly property var mainApp: priv.focusedAppDelegate ? priv.focusedAppDelegate.application : null
6363
6464 // application windows never rotate independently
6565 property int mainAppWindowOrientationAngle: shellOrientationAngle
6666
67− property bool orientationChangesEnabled: priv.focusedAppDelegate && priv.focusedAppDelegate.orientationChangesEnabled
67+ property bool orientationChangesEnabled: !priv.focusedAppDelegate || priv.focusedAppDelegate.orientationChangesEnabled
6868
6969 property int supportedOrientations: {
7070 if (mainApp) {
@@ -105,9 +105,13 @@ FocusScope {
105105 edgeBarrier.push(amount);
106106 }
107107
108+ function closeSpread() {
109+ priv.goneToSpread = false;
110+ }
111+
108112 onSpreadEnabledChanged: {
109− if (!spreadEnabled && root.state == "spread") {
110− priv.goneToSpread = false;
113+ if (!spreadEnabled && spreadShown) {
114+ closeSpread();
111115 }
112116 }
113117
@@ -409,12 +413,20 @@ FocusScope {
409413 PropertyChanges { target: hoverMouseArea; enabled: true }
410414 PropertyChanges { target: rightEdgeDragArea; enabled: false }
411415 PropertyChanges { target: cancelSpreadMouseArea; enabled: true }
416+ PropertyChanges { target: blurLayer; visible: true; blurRadius: 32; brightness: .65 }
412417 },
413418 State {
414419 name: "stagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "staged"
420+ PropertyChanges {
421+ target: blurLayer;
422+ visible: true;
423+ blurRadius: 32
424+ brightness: MathUtils.linearAnimation(spreadItem.rightEdgeBreakPoint, 1, 0, .65, Math.max(rightEdgeDragArea.progress, edgeBarrier.progress))
425+ }
415426 },
416427 State {
417428 name: "sideStagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "stagedWithSideStage"
429+ extend: "stagedRightEdge"
418430 PropertyChanges {
419431 target: sideStage
420432 opacity: priv.sideStageDelegate.x === sideStage.x ? 1 : 0
@@ -423,9 +435,16 @@ FocusScope {
423435 },
424436 State {
425437 name: "windowedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "windowed"
438+ PropertyChanges {
439+ target: blurLayer;
440+ visible: true
441+ blurRadius: MathUtils.linearAnimation(spreadItem.rightEdgeBreakPoint, 1, 0, 32, Math.max(rightEdgeDragArea.progress, edgeBarrier.progress))
442+ brightness: MathUtils.linearAnimation(spreadItem.rightEdgeBreakPoint, 1, 1, .65, Math.max(rightEdgeDragArea.progress, edgeBarrier.progress))
443+ }
426444 },
427445 State {
428446 name: "staged"; when: root.mode === "staged"
447+ PropertyChanges { target: wallpaper; visible: false }
429448 },
430449 State {
431450 name: "stagedWithSideStage"; when: root.mode === "stagedWithSideStage"
@@ -440,6 +459,7 @@ FocusScope {
440459 Transition {
441460 from: "stagedRightEdge,sideStagedRightEdge,windowedRightEdge"; to: "spread"
442461 PropertyAction { target: spreadItem; property: "highlightedIndex"; value: -1 }
462+ PropertyAnimation { target: blurLayer; properties: "brightness,blurRadius"; duration: priv.animationDuration }
443463 },
444464 Transition {
445465 to: "spread"
@@ -462,7 +482,7 @@ FocusScope {
462482 }
463483 },
464484 Transition {
465− to: "stagedRightEdge"
485+ to: "stagedRightEdge,sideStagedRightEdge"
466486 PropertyAction { target: floatingFlickable; property: "contentX"; value: 0 }
467487 },
468488 Transition {
@@ -494,6 +514,13 @@ FocusScope {
494514 z: -2
495515 }
496516
517+ BlurLayer {
518+ id: blurLayer
519+ anchors.fill: parent
520+ source: wallpaper
521+ visible: false
522+ }
523+
497524 Spread {
498525 id: spreadItem
499526 objectName: "spreadItem"
@@ -1052,6 +1079,7 @@ FocusScope {
10521079 showHighlight: spreadItem.highlightedIndex === index
10531080 darkening: spreadItem.highlightedIndex >= 0
10541081 anchors.topMargin: dragArea.distance
1082+ interactive: false
10551083 }
10561084 PropertyChanges {
10571085 target: appDelegate
@@ -1091,7 +1119,10 @@ FocusScope {
10911119 scaleToPreviewSize: spreadItem.stackHeight
10921120 scaleToPreviewProgress: stagedRightEdgeMaths.scaleToPreviewProgress
10931121 shadowOpacity: .3
1122+ interactive: false
10941123 }
1124+ // make sure it's visible but transparent so it fades in when we transition to spread
1125+ PropertyChanges { target: windowInfoItem; opacity: 0; visible: true }
10951126 },
10961127 State {
10971128 name: "windowedRightEdge"
@@ -1350,6 +1381,7 @@ FocusScope {
13501381 PropertyAction { target: decoratedWindow; property: "scaleToPreviewSize" }
13511382 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
13521383 UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle,scaleToPreviewProgress"; duration: priv.animationDuration }
1384+ UbuntuNumberAnimation { target: windowInfoItem; properties: "opacity"; duration: priv.animationDuration }
13531385 },
13541386 Transition {
13551387 from: "normal,staged"; to: "stagedWithSideStage"
@@ -1562,7 +1594,7 @@ FocusScope {
15621594 maxWidth: {
15631595 var nextApp = appRepeater.itemAt(index + 1);
15641596 if (nextApp) {
1565− return nextApp.x - appDelegate.x - units.gu(1)
1597+ return Math.max(iconHeight, nextApp.x - appDelegate.x - units.gu(1))
15661598 }
15671599 return appDelegate.width;
15681600 }
@@ -1730,7 +1762,7 @@ FocusScope {
17301762 property var gesturePoints: []
17311763 property bool cancelled: false
17321764
1733− property real progress: dragging ? -touchPosition.x / root.width : 0
1765+ property real progress: -touchPosition.x / root.width
17341766 onProgressChanged: {
17351767 if (dragging) {
17361768 draggedProgress = progress;