@@ -46,6 +46,7 @@ FocusScope {
46 property int leftMargin: 0
46 property int leftMargin: 0
47 property bool oskEnabled: false
47 property bool oskEnabled: false
48 property rect inputMethodRect
48 property rect inputMethodRect
49+ property real rightEdgePushProgress: 0
50 // Configuration
51 // Configuration
51 property string mode: "staged"
52 property string mode: "staged"
@@ -127,11 +128,6 @@ FocusScope {
127 // functions to be called from outside
128 // functions to be called from outside
128 function updateFocusedAppOrientation() { /* TODO */ }
129 function updateFocusedAppOrientation() { /* TODO */ }
129 function updateFocusedAppOrientationAnimated() { /* TODO */}
130 function updateFocusedAppOrientationAnimated() { /* TODO */}
130− function pushRightEdge(amount) {
131− if (root.spreadEnabled) {
132− edgeBarrier.push(amount);
136 function closeSpread() {
132 function closeSpread() {
137 priv.goneToSpread = false;
133 priv.goneToSpread = false;
@@ -143,6 +139,12 @@ FocusScope {
142+ onRightEdgePushProgressChanged: {
143+ if (spreadEnabled && rightEdgePushProgress >= 1) {
144+ priv.goneToSpread = true
146 GSettings {
148 GSettings {
147 id: lifecycleExceptions
149 id: lifecycleExceptions
148 schema.id: "com.canonical.qtmir"
150 schema.id: "com.canonical.qtmir"
@@ -454,7 +456,7 @@ FocusScope {
454 PropertyChanges { target: wallpaper; visible: false }
456 PropertyChanges { target: wallpaper; visible: false }
457− name: "stagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "staged"
459+ name: "stagedRightEdge"; when: root.spreadEnabled && (rightEdgeDragArea.dragging || rightEdgePushProgress > 0) && root.mode == "staged"
458 PropertyChanges {
460 PropertyChanges {
459 target: blurLayer;
461 target: blurLayer;
460 visible: true;
462 visible: true;
@@ -464,7 +466,7 @@ FocusScope {
467− name: "sideStagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "stagedWithSideStage"
469+ name: "sideStagedRightEdge"; when: root.spreadEnabled && (rightEdgeDragArea.dragging || rightEdgePushProgress > 0) && root.mode == "stagedWithSideStage"
468 extend: "stagedRightEdge"
470 extend: "stagedRightEdge"
469 PropertyChanges {
471 PropertyChanges {
470 target: sideStage
472 target: sideStage
@@ -473,13 +475,13 @@ FocusScope {
476− name: "windowedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "windowed"
478+ name: "windowedRightEdge"; when: root.spreadEnabled && (rightEdgeDragArea.dragging || rightEdgePushProgress > 0) && root.mode == "windowed"
477 PropertyChanges {
479 PropertyChanges {
478 target: blurLayer;
480 target: blurLayer;
479 visible: true
481 visible: true
480 blurRadius: 32
482 blurRadius: 32
481 brightness: .65
483 brightness: .65
482− opacity: MathUtils.linearAnimation(spreadItem.rightEdgeBreakPoint, 1, 0, 1, Math.max(rightEdgeDragArea.dragging ? rightEdgeDragArea.progress : 0, edgeBarrier.progress))
484+ opacity: MathUtils.linearAnimation(spreadItem.rightEdgeBreakPoint, 1, 0, 1, Math.max(rightEdgeDragArea.dragging ? rightEdgeDragArea.progress : 0, rightEdgePushProgress))
@@ -1203,7 +1205,7 @@ FocusScope {
1203 when: (root.mode == "staged" || root.mode == "stagedWithSideStage") && (root.state == "sideStagedRightEdge" || root.state == "stagedRightEdge" || rightEdgeFocusAnimation.running || hidingAnimation.running)
1205 when: (root.mode == "staged" || root.mode == "stagedWithSideStage") && (root.state == "sideStagedRightEdge" || root.state == "stagedRightEdge" || rightEdgeFocusAnimation.running || hidingAnimation.running)
1204 PropertyChanges {
1206 PropertyChanges {
1205 target: stagedRightEdgeMaths
1207 target: stagedRightEdgeMaths
1206− progress: Math.max(edgeBarrier.progress, rightEdgeDragArea.draggedProgress)
1208+ progress: Math.max(rightEdgePushProgress, rightEdgeDragArea.draggedProgress)
1208 PropertyChanges {
1210 PropertyChanges {
1209 target: appDelegate
1211 target: appDelegate
@@ -1230,11 +1232,11 @@ FocusScope {
1232 name: "windowedRightEdge"
1234 name: "windowedRightEdge"
1233− when: root.mode == "windowed" && (root.state == "windowedRightEdge" || rightEdgeFocusAnimation.running || hidingAnimation.running || edgeBarrier.progress > 0)
1235+ when: root.mode == "windowed" && (root.state == "windowedRightEdge" || rightEdgeFocusAnimation.running || hidingAnimation.running || rightEdgePushProgress > 0)
1234 PropertyChanges {
1236 PropertyChanges {
1235 target: windowedRightEdgeMaths
1237 target: windowedRightEdgeMaths
1236 swipeProgress: rightEdgeDragArea.dragging ? rightEdgeDragArea.progress : 0
1238 swipeProgress: rightEdgeDragArea.dragging ? rightEdgeDragArea.progress : 0
1237− pushProgress: edgeBarrier.progress
1239+ pushProgress: rightEdgePushProgress
1239 PropertyChanges {
1241 PropertyChanges {
1240 target: appDelegate
1242 target: appDelegate
@@ -1766,30 +1768,6 @@ FocusScope {
1766 appContainerHeight: appContainer.height
1768 appContainerHeight: appContainer.height
1772− // NB: it does its own positioning according to the specified edge
1775− onPassed: priv.goneToSpread = true;
1777− material: Component {
1780− width: parent.height
1781− height: parent.width
1783− anchors.centerIn: parent
1784− gradient: Gradient {
1785− GradientStop { position: 0.0; color: Qt.rgba(0.16,0.16,0.16,0.5)}
1786− GradientStop { position: 1.0; color: Qt.rgba(0.16,0.16,0.16,0)}
1793 MouseArea {
1771 MouseArea {
1794 id: hoverMouseArea
1772 id: hoverMouseArea
1795 objectName: "hoverMouseArea"
1773 objectName: "hoverMouseArea"