on xenial help sign in
start to move to a single right edge implementation, not yet sure if it'll work out though
d1bd053Michael Zanetti
qml/Stages/DesktopStage.qml+63−15
@@ -300,6 +300,9 @@ AbstractStage {
300 State {
300 State {
301 name: "stagedrightedge"; when: rightEdgeDragArea.dragging && root.mode == "staged"
301 name: "stagedrightedge"; when: rightEdgeDragArea.dragging && root.mode == "staged"
302 },
302 },
303+ State {
304+ name: "sidestagedrightedge"; when: rightEdgeDragArea.dragging && root.mode == "stagedWithSideStage"
305+ },
303 State {
306 State {
304 name: "windowedrightedge"; when: rightEdgeDragArea.dragging && root.mode == "windowed"
307 name: "windowedrightedge"; when: rightEdgeDragArea.dragging && root.mode == "windowed"
305 },
308 },
@@ -728,7 +731,8 @@ AbstractStage {
728 }
731 }
729
732
730 function playFocusAnimation() {
733 function playFocusAnimation() {
731− if (state == "stagedrightedge") {
734+ if (state == "stagedrightedge" || state == "sidestagedrightedge") {
735+ rightEdgeFocusAnimation.targetX = appDelegate.stage == ApplicationInfoInterface.SideStage ? sideStage.x : 0
732 rightEdgeFocusAnimation.start()
736 rightEdgeFocusAnimation.start()
733 } else {
737 } else {
734 focusAnimation.start()
738 focusAnimation.start()
@@ -748,7 +752,8 @@ AbstractStage {
748 }
752 }
749 ParallelAnimation {
753 ParallelAnimation {
750 id: rightEdgeFocusAnimation
754 id: rightEdgeFocusAnimation
755+ property int targetX: 0
751− UbuntuNumberAnimation { target: appDelegate; properties: "x"; to: 0; duration: priv.animationDuration }
756+ UbuntuNumberAnimation { target: appDelegate; properties: "x"; to: targetX; duration: priv.animationDuration }
752 UbuntuNumberAnimation { target: decoratedWindow; properties: "angle"; to: 0; duration: priv.animationDuration }
757 UbuntuNumberAnimation { target: decoratedWindow; properties: "angle"; to: 0; duration: priv.animationDuration }
753 UbuntuNumberAnimation { target: decoratedWindow; properties: "itemScale"; to: 1; duration: priv.animationDuration }
758 UbuntuNumberAnimation { target: decoratedWindow; properties: "itemScale"; to: 1; duration: priv.animationDuration }
754 onStopped: appDelegate.focus = true
759 onStopped: appDelegate.focus = true
@@ -784,6 +789,24 @@ AbstractStage {
784 progress: 0
789 progress: 0
785 targetHeight: spreadMaths.stackHeight
790 targetHeight: spreadMaths.stackHeight
786 targetX: spreadMaths.targetX
791 targetX: spreadMaths.targetX
792+ startY: appDelegate.fullscreen ? 0 : PanelState.panelHeight
793+ targetY: spreadMaths.targetY
794+ targetAngle: spreadMaths.targetAngle
795+ targetScale: spreadMaths.targetScale
796+ }
797+
798+ SideStagedRightEdgeMaths {
799+ id: sideStagedRightEdgeMaths
800+ sceneWidth: appContainer.width - root.leftMargin
801+ sceneHeight: appContainer.height
802+ isMainStageApp: priv.mainStageDelegate == appDelegate
803+ isSideStageApp: priv.sideStageDelegate == appDelegate
804+ sideStageWidth: sideStage.width
805+ itemIndex: index
806+ progress: 0
807+ targetHeight: spreadMaths.stackHeight
808+ targetX: spreadMaths.targetX
809+ startY: appDelegate.fullscreen ? 0 : PanelState.panelHeight
787 targetY: spreadMaths.targetY
810 targetY: spreadMaths.targetY
788 targetAngle: spreadMaths.targetAngle
811 targetAngle: spreadMaths.targetAngle
789 targetScale: spreadMaths.targetScale
812 targetScale: spreadMaths.targetScale
@@ -820,32 +843,57 @@ AbstractStage {
820 PropertyChanges { target: dragArea; enabled: true }
843 PropertyChanges { target: dragArea; enabled: true }
821 PropertyChanges { target: windowInfoItem; opacity: spreadMaths.tileInfoOpacity; visible: spreadMaths.itemVisible }
844 PropertyChanges { target: windowInfoItem; opacity: spreadMaths.tileInfoOpacity; visible: spreadMaths.itemVisible }
822 },
845 },
846+// State {
847+// name: "stagedrightedge";
848+// when: root.state == "stagedrightedge" || rightEdgeFocusAnimation.running || hidingAnimation.running
849+// PropertyChanges {
850+// target: stagedRightEdgeMaths
851+// progress: rightEdgeDragArea.progress
852+// }
853+// PropertyChanges {
854+// target: appDelegate
855+// y: stagedRightEdgeMaths.animatedY
856+// x: stagedRightEdgeMaths.animatedX
857+// z: index +1
858+// height: stagedRightEdgeMaths.animatedHeight
859+// requestedWidth: decoratedWindow.oldRequestedWidth
860+// requestedHeight: decoratedWindow.oldRequestedHeight
861+// visible: stagedRightEdgeMaths.itemVisible
862+// }
863+// PropertyChanges {
864+// target: decoratedWindow;
865+// hasDecoration: false
866+// angle: stagedRightEdgeMaths.animatedAngle
867+// itemScale: stagedRightEdgeMaths.animatedScale
868+// scaleToPreviewSize: spreadItem.stackHeight
869+// scaleToPreviewProgress: stagedRightEdgeMaths.scaleToPreviewProgress
870+// shadowOpacity: 0.3
871+// }
872+// },
823 State {
873 State {
824− name: "stagedrightedge";
874+ name: "sidestagedrightedge"
825− when: root.state == "stagedrightedge" || rightEdgeFocusAnimation.running || hidingAnimation.running
875+ when: root.state == "sidestagedrightedge" || root.state == "stagedrightedge" || rightEdgeFocusAnimation.running || hidingAnimation.running
826 PropertyChanges {
876 PropertyChanges {
827− target: stagedRightEdgeMaths
877+ target: sideStagedRightEdgeMaths
828 progress: rightEdgeDragArea.progress
878 progress: rightEdgeDragArea.progress
829− startY: appDelegate.fullscreen ? 0 : PanelState.panelHeight
830 }
879 }
831 PropertyChanges {
880 PropertyChanges {
832 target: appDelegate
881 target: appDelegate
833− y: stagedRightEdgeMaths.animatedY
882+ x: sideStagedRightEdgeMaths.animatedX
834− x: stagedRightEdgeMaths.animatedX
883+ y: sideStagedRightEdgeMaths.animatedY
835 z: index +1
884 z: index +1
836− height: stagedRightEdgeMaths.animatedHeight
885+ height: sideStagedRightEdgeMaths.animatedHeight
837 requestedWidth: decoratedWindow.oldRequestedWidth
886 requestedWidth: decoratedWindow.oldRequestedWidth
838 requestedHeight: decoratedWindow.oldRequestedHeight
887 requestedHeight: decoratedWindow.oldRequestedHeight
839− visible: stagedRightEdgeMaths.itemVisible
840 }
888 }
841 PropertyChanges {
889 PropertyChanges {
842− target: decoratedWindow;
890+ target: decoratedWindow
843 hasDecoration: false
891 hasDecoration: false
844− angle: stagedRightEdgeMaths.animatedAngle
892+ angle: sideStagedRightEdgeMaths.animatedAngle
845− itemScale: stagedRightEdgeMaths.animatedScale
893+ itemScale: sideStagedRightEdgeMaths.animatedScale
846 scaleToPreviewSize: spreadItem.stackHeight
894 scaleToPreviewSize: spreadItem.stackHeight
847− scaleToPreviewProgress: stagedRightEdgeMaths.scaleToPreviewProgress
895+ scaleToPreviewProgress: sideStagedRightEdgeMaths.scaleToPreviewProgress
848− shadowOpacity: 0.3
896+ shadowOpacity: .3
849 }
897 }
850 },
898 },
851 State {
899 State {
qml/Stages/Spread/StagedRightEdgeMaths.qml+2−1
@@ -19,13 +19,14 @@ QtObject {
19 property real startScale: 1.3
19 property real startScale: 1.3
20 property real targetScale: 0
20 property real targetScale: 0
21
21
22−
23 onProgressChanged: if (itemIndex == 0) { print("progress", progress) }
22 onProgressChanged: if (itemIndex == 0) { print("progress", progress) }
24
23
25 // Config
24 // Config
26 property real breakPoint: 0.4
25 property real breakPoint: 0.4
27 property int tileDistance: units.gu(10)
26 property int tileDistance: units.gu(10)
28
27
28+
29+
29 // Output
30 // Output
30
31
31 readonly property real scaleToPreviewProgress: {
32 readonly property real scaleToPreviewProgress: {