@@ -129,7 +129,8 @@ AbstractStage {
129 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel
129 property var foregroundMaximizedAppDelegate: null // for stuff like drop shadow and focusing maximized app by clicking panel
131 property bool goneToSpread: false
131 property bool goneToSpread: false
132+// property int animationDuration: 4000
132− property int animationDuration: UbuntuAnimation.FastDuration //4000//UbuntuAnimation.SleepyDuration
133+ property int animationDuration: UbuntuAnimation.FastDuration
134 function updateForegroundMaximizedApp() {
135 function updateForegroundMaximizedApp() {
135 var found = false;
136 var found = false;
@@ -490,7 +491,7 @@ AbstractStage {
490 readonly property bool maximizedHorizontally: windowState & WindowStateStorage.WindowStateMaximizedHorizontally
491 readonly property bool maximizedHorizontally: windowState & WindowStateStorage.WindowStateMaximizedHorizontally
491 readonly property bool maximizedVertically: windowState & WindowStateStorage.WindowStateMaximizedVertically
492 readonly property bool maximizedVertically: windowState & WindowStateStorage.WindowStateMaximizedVertically
492 readonly property bool minimized: windowState & WindowStateStorage.WindowStateMinimized
493 readonly property bool minimized: windowState & WindowStateStorage.WindowStateMinimized
493− readonly property bool fullscreen: state == "fullscreen"
494+ readonly property bool fullscreen: surface.state === Mir.FullscreenState;
495 property int windowState: WindowStateStorage.WindowStateNormal
496 property int windowState: WindowStateStorage.WindowStateNormal
496 property bool animationsEnabled: true
497 property bool animationsEnabled: true
@@ -687,6 +688,7 @@ AbstractStage {
687 id: rightEdgeFocusAnimation
688 id: rightEdgeFocusAnimation
688 UbuntuNumberAnimation { target: appDelegate; properties: "x"; to: 0; duration: priv.animationDuration }
689 UbuntuNumberAnimation { target: appDelegate; properties: "x"; to: 0; duration: priv.animationDuration }
689 UbuntuNumberAnimation { target: decoratedWindow; properties: "angle"; to: 0; duration: priv.animationDuration }
690 UbuntuNumberAnimation { target: decoratedWindow; properties: "angle"; to: 0; duration: priv.animationDuration }
691+ UbuntuNumberAnimation { target: decoratedWindow; properties: "itemScale"; to: 1; duration: priv.animationDuration }
690 onStopped: appDelegate.focus = true
692 onStopped: appDelegate.focus = true
692 ParallelAnimation {
694 ParallelAnimation {
@@ -720,7 +722,9 @@ AbstractStage {
720 progress: 0
722 progress: 0
721 targetHeight: spreadMaths.stackHeight
723 targetHeight: spreadMaths.stackHeight
722 targetX: spreadMaths.targetX
724 targetX: spreadMaths.targetX
725+ targetY: spreadMaths.targetY
723 targetAngle: spreadMaths.targetAngle
726 targetAngle: spreadMaths.targetAngle
727+ targetScale: spreadMaths.targetScale
726// onXChanged: if (model.application.appId == "unity8-dash") print("dash moved to", x)
730// onXChanged: if (model.application.appId == "unity8-dash") print("dash moved to", x)
@@ -733,10 +737,11 @@ AbstractStage {
733 target: decoratedWindow;
737 target: decoratedWindow;
734 showDecoration: false;
738 showDecoration: false;
735 angle: spreadMaths.targetAngle
739 angle: spreadMaths.targetAngle
736− itemScale: spreadMaths.scale
740+ itemScale: spreadMaths.targetScale
737 scaleToPreviewSize: spreadItem.stackHeight
741 scaleToPreviewSize: spreadItem.stackHeight
738 scaleToPreviewProgress: 1
742 scaleToPreviewProgress: 1
739 hasDecoration: root.mode === "windowed"
743 hasDecoration: root.mode === "windowed"
741 PropertyChanges {
746 PropertyChanges {
742 target: appDelegate
747 target: appDelegate
@@ -756,10 +761,11 @@ AbstractStage {
756 PropertyChanges {
761 PropertyChanges {
757 target: stagedRightEdgeMaths
762 target: stagedRightEdgeMaths
758 progress: rightEdgeDragArea.progress
763 progress: rightEdgeDragArea.progress
764+ startY: appDelegate.fullscreen ? 0 : PanelState.panelHeight
760 PropertyChanges {
766 PropertyChanges {
761 target: appDelegate
767 target: appDelegate
762− y: PanelState.panelHeight
768+ y: stagedRightEdgeMaths.animatedY
763 x: stagedRightEdgeMaths.animatedX
769 x: stagedRightEdgeMaths.animatedX
764 z: index +1
770 z: index +1
765 height: stagedRightEdgeMaths.animatedHeight
771 height: stagedRightEdgeMaths.animatedHeight
@@ -770,8 +776,10 @@ AbstractStage {
770 target: decoratedWindow;
776 target: decoratedWindow;
771 hasDecoration: false
777 hasDecoration: false
772 angle: stagedRightEdgeMaths.animatedAngle
778 angle: stagedRightEdgeMaths.animatedAngle
779+ itemScale: stagedRightEdgeMaths.animatedScale
773 scaleToPreviewSize: spreadItem.stackHeight
780 scaleToPreviewSize: spreadItem.stackHeight
774− scaleToPreviewProgress: stagedRightEdgeMaths.progress
781+ scaleToPreviewProgress: stagedRightEdgeMaths.scaleToPreviewProgress
@@ -781,7 +789,7 @@ AbstractStage {
781 x: appDelegate.focus ? 0 : root.width
789 x: appDelegate.focus ? 0 : root.width
782 y: appDelegate.fullscreen ? 0 : PanelState.panelHeight
790 y: appDelegate.fullscreen ? 0 : PanelState.panelHeight
783 requestedWidth: appContainer.width
791 requestedWidth: appContainer.width
784− requestedHeight: appContainer.height - PanelState.panelHeight
792+ requestedHeight: appDelegate.fullscreen ? appContainer.height : appContainer.height - PanelState.panelHeight
785 visuallyMaximized: true
793 visuallyMaximized: true
787 PropertyChanges {
795 PropertyChanges {
@@ -854,6 +862,7 @@ AbstractStage {
855 PropertyChanges { target: touchControls; enabled: true }
863 PropertyChanges { target: touchControls; enabled: true }
856 PropertyChanges { target: resizeArea; enabled: true }
864 PropertyChanges { target: resizeArea; enabled: true }
865+ PropertyChanges { target: decoratedWindow; shadowOpacity: .3}
859 name: "maximizedLeft"; when: appDelegate.maximizedLeft && !appDelegate.minimized
868 name: "maximizedLeft"; when: appDelegate.maximizedLeft && !appDelegate.minimized
@@ -866,6 +875,7 @@ AbstractStage {
866 target: decoratedWindow
875 target: decoratedWindow
867 requestedWidth: (appContainer.width - root.leftMargin)/2
876 requestedWidth: (appContainer.width - root.leftMargin)/2
868 requestedHeight: appContainer.height - PanelState.panelHeight
877 requestedHeight: appContainer.height - PanelState.panelHeight
@@ -879,17 +889,26 @@ AbstractStage {
879 target: decoratedWindow
889 target: decoratedWindow
880 requestedWidth: (appContainer.width - root.leftMargin)/2
890 requestedWidth: (appContainer.width - root.leftMargin)/2
881 requestedHeight: appContainer.height - PanelState.panelHeight
891 requestedHeight: appContainer.height - PanelState.panelHeight
885 name: "maximizedHorizontally"; when: appDelegate.maximizedHorizontally && !appDelegate.minimized
896 name: "maximizedHorizontally"; when: appDelegate.maximizedHorizontally && !appDelegate.minimized
886 PropertyChanges { target: appDelegate; x: root.leftMargin }
897 PropertyChanges { target: appDelegate; x: root.leftMargin }
899+ target: decoratedWindow;
887− PropertyChanges { target: decoratedWindow; requestedWidth: appContainer.width - root.leftMargin }
900+ requestedWidth: appContainer.width - root.leftMargin
890 name: "maximizedVertically"; when: appDelegate.maximizedVertically && !appDelegate.minimized
905 name: "maximizedVertically"; when: appDelegate.maximizedVertically && !appDelegate.minimized
891 PropertyChanges { target: appDelegate; y: PanelState.panelHeight }
906 PropertyChanges { target: appDelegate; y: PanelState.panelHeight }
908+ target: decoratedWindow;
892− PropertyChanges { target: decoratedWindow; requestedHeight: appContainer.height - PanelState.panelHeight }
909+ requestedHeight: appContainer.height - PanelState.panelHeight
895 name: "minimized"; when: appDelegate.minimized
914 name: "minimized"; when: appDelegate.minimized
@@ -912,7 +931,7 @@ AbstractStage {
912 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
931 UbuntuNumberAnimation { target: appDelegate; properties: "x,y,opacity,requestedWidth,requestedHeight,scale"; duration: priv.animationDuration }
914 Transition {
933 Transition {
915− from: "spread"; to: "staged,normal"
934+ from: "spread"; to: "*"
916// UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
935// UbuntuNumberAnimation { target: appDelegate; properties: "x,y,height"; duration: priv.animationDuration }
917// UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle"; duration: priv.animationDuration }
936// UbuntuNumberAnimation { target: decoratedWindow; properties: "width,height,itemScale,angle"; duration: priv.animationDuration }
918 ScriptAction { script: if (appDelegate.focus) appDelegate.playFocusAnimation() }
937 ScriptAction { script: if (appDelegate.focus) appDelegate.playFocusAnimation() }
@@ -1068,15 +1087,6 @@ AbstractStage {
1073− fill: decoratedWindow
1074− margins: /*active ? -units.gu(2) : */-units.gu(1.5)
1076− source: "graphics/dropshadow2gu.sci"
1077− opacity: root.shadowOpacity * .3
1082 WindowControlsOverlay {
1092 WindowControlsOverlay {
@@ -1199,7 +1209,7 @@ AbstractStage {
1199 // A potential edge-drag gesture has started. Start recording it
1209 // A potential edge-drag gesture has started. Start recording it
1200 gesturePoints = [];
1210 gesturePoints = [];
1201 } else {
1211 } else {
1202− if (gesturePoints[gesturePoints.length - 1] < -root.width / 2) {
1212+ if (gesturePoints[gesturePoints.length - 1] < -root.width * 0.4 ) {
1203 priv.goneToSpread = true;
1213 priv.goneToSpread = true;
1204 } else {
1214 } else {
1205 if (appRepeater.count > 1) {
1215 if (appRepeater.count > 1) {