@@ -129,7 +129,8 @@ AbstractStage {
129129 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel
130130
131131 property bool goneToSpread: false
132− property int animationDuration: UbuntuAnimation.FastDuration //4000//UbuntuAnimation.SleepyDuration
132+// property int animationDuration: 4000
133+ property int animationDuration: UbuntuAnimation.FastDuration
133134
134135 function updateForegroundMaximizedApp() {
135136 var found = false;
@@ -490,7 +491,7 @@ AbstractStage {
490491 readonly property bool maximizedHorizontally: windowState & WindowStateStorage.WindowStateMaximizedHorizontally
491492 readonly property bool maximizedVertically: windowState & WindowStateStorage.WindowStateMaximizedVertically
492493 readonly property bool minimized: windowState & WindowStateStorage.WindowStateMinimized
493− readonly property bool fullscreen: state == "fullscreen"
494+ readonly property bool fullscreen: surface.state === Mir.FullscreenState;
494495
495496 property int windowState: WindowStateStorage.WindowStateNormal
496497 property bool animationsEnabled: true
@@ -687,6 +688,7 @@ AbstractStage {
687688 id: rightEdgeFocusAnimation
688689 UbuntuNumberAnimation { target: appDelegate; properties: "x"; to: 0; duration: priv.animationDuration }
689690 UbuntuNumberAnimation { target: decoratedWindow; properties: "angle"; to: 0; duration: priv.animationDuration }
691+ UbuntuNumberAnimation { target: decoratedWindow; properties: "itemScale"; to: 1; duration: priv.animationDuration }
690692 onStopped: appDelegate.focus = true
691693 }
692694 ParallelAnimation {
@@ -720,7 +722,9 @@ AbstractStage {
720722 progress: 0
721723 targetHeight: spreadMaths.stackHeight
722724 targetX: spreadMaths.targetX
725+ targetY: spreadMaths.targetY
723726 targetAngle: spreadMaths.targetAngle
727+ targetScale: spreadMaths.targetScale
724728 }
725729
726730// onXChanged: if (model.application.appId == "unity8-dash") print("dash moved to", x)
@@ -733,10 +737,11 @@ AbstractStage {
733737 target: decoratedWindow;
734738 showDecoration: false;
735739 angle: spreadMaths.targetAngle
736− itemScale: spreadMaths.scale
740+ itemScale: spreadMaths.targetScale
737741 scaleToPreviewSize: spreadItem.stackHeight
738742 scaleToPreviewProgress: 1
739743 hasDecoration: root.mode === "windowed"
744+ shadowOpacity: .3
740745 }
741746 PropertyChanges {
742747 target: appDelegate
@@ -756,10 +761,11 @@ AbstractStage {
756761 PropertyChanges {
757762 target: stagedRightEdgeMaths
758763 progress: rightEdgeDragArea.progress
764+ startY: appDelegate.fullscreen ? 0 : PanelState.panelHeight
759765 }
760766 PropertyChanges {
761767 target: appDelegate
762− y: PanelState.panelHeight
768+ y: stagedRightEdgeMaths.animatedY
763769 x: stagedRightEdgeMaths.animatedX
764770 z: index +1
765771 height: stagedRightEdgeMaths.animatedHeight
@@ -770,8 +776,10 @@ AbstractStage {
770776 target: decoratedWindow;
771777 hasDecoration: false
772778 angle: stagedRightEdgeMaths.animatedAngle
779+ itemScale: stagedRightEdgeMaths.animatedScale
773780 scaleToPreviewSize: spreadItem.stackHeight
774− scaleToPreviewProgress: stagedRightEdgeMaths.progress
781+ scaleToPreviewProgress: stagedRightEdgeMaths.scaleToPreviewProgress
782+ shadowOpacity: 0.3
775783 }
776784 },
777785 State {
@@ -781,7 +789,7 @@ AbstractStage {
781789 x: appDelegate.focus ? 0 : root.width
782790 y: appDelegate.fullscreen ? 0 : PanelState.panelHeight
783791 requestedWidth: appContainer.width
784− requestedHeight: appContainer.height - PanelState.panelHeight
792+ requestedHeight: appDelegate.fullscreen ? appContainer.height : appContainer.height - PanelState.panelHeight
785793 visuallyMaximized: true
786794 }
787795 PropertyChanges {
@@ -854,6 +862,7 @@ AbstractStage {
854862 }
855863 PropertyChanges { target: touchControls; enabled: true }
856864 PropertyChanges { target: resizeArea; enabled: true }
865+ PropertyChanges { target: decoratedWindow; shadowOpacity: .3}
857866 },
858867 State {
859868 name: "maximizedLeft"; when: appDelegate.maximizedLeft && !appDelegate.minimized
@@ -866,6 +875,7 @@ AbstractStage {
866875 target: decoratedWindow
867876 requestedWidth: (appContainer.width - root.leftMargin)/2
868877 requestedHeight: appContainer.height - PanelState.panelHeight
878+ shadowOpacity: .3
869879 }
870880 },
871881 State {
@@ -879,17 +889,26 @@ AbstractStage {
879889 target: decoratedWindow
880890 requestedWidth: (appContainer.width - root.leftMargin)/2
881891 requestedHeight: appContainer.height - PanelState.panelHeight
892+ shadowOpacity: .3
882893 }
883894 },
884895 State {
885896 name: "maximizedHorizontally"; when: appDelegate.maximizedHorizontally && !appDelegate.minimized
886897 PropertyChanges { target: appDelegate; x: root.leftMargin }
887− PropertyChanges { target: decoratedWindow; requestedWidth: appContainer.width - root.leftMargin }
898+ PropertyChanges {
899+ target: decoratedWindow;
900+ requestedWidth: appContainer.width - root.leftMargin
901+ shadowOpacity: .3
902+ }
888903 },
889904 State {
890905 name: "maximizedVertically"; when: appDelegate.maximizedVertically && !appDelegate.minimized
891906 PropertyChanges { target: appDelegate; y: PanelState.panelHeight }
892− PropertyChanges { target: decoratedWindow; requestedHeight: appContainer.height - PanelState.panelHeight }
907+ PropertyChanges {
908+ target: decoratedWindow;
909+ requestedHeight: appContainer.height - PanelState.panelHeight
910+ shadowOpacity: .3
911+ }
893912 },
894913 State {
895914 name: "minimized"; when: appDelegate.minimized
@@ -912,7 +931,7 @@ AbstractStage {
912931 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
913932 },
914933 Transition {
915− from: "spread"; to: "staged,normal"
934+ from: "spread"; to: "*"
916935// UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
917936// UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle"; duration: priv.animationDuration }
918937 ScriptAction { script: if (appDelegate.focus) appDelegate.playFocusAnimation() }
@@ -1068,15 +1087,6 @@ AbstractStage {
10681087 }
10691088 ]
10701089 }
1071− BorderImage {
1072− anchors {
1073− fill: decoratedWindow
1074− margins: /*active ? -units.gu(2) : */-units.gu(1.5)
1075− }
1076− source: "graphics/dropshadow2gu.sci"
1077− opacity: root.shadowOpacity * .3
1078− visible: false
1079− }
10801090
10811091
10821092 WindowControlsOverlay {
@@ -1199,7 +1209,7 @@ AbstractStage {
11991209 // A potential edge-drag gesture has started. Start recording it
12001210 gesturePoints = [];
12011211 } else {
1202− if (gesturePoints[gesturePoints.length - 1] < -root.width / 2) {
1212+ if (gesturePoints[gesturePoints.length - 1] < -root.width * 0.4 ) {
12031213 priv.goneToSpread = true;
12041214 } else {
12051215 if (appRepeater.count > 1) {