@@ -47,6 +47,7 @@ FocusScope {
4747 property int leftMargin: 0
4848 property bool oskEnabled: false
4949 property rect inputMethodRect
50+ property real rightEdgePushProgress: 0
5051
5152 // Configuration
5253 property string mode: "staged"
@@ -126,9 +127,6 @@ FocusScope {
126127 // functions to be called from outside
127128 function updateFocusedAppOrientation() { /* TODO */ }
128129 function updateFocusedAppOrientationAnimated() { /* TODO */}
129− function pushRightEdge(amount) {
130− edgeBarrier.push(amount);
131− }
132130
133131 function closeSpread() {
134132 priv.goneToSpread = false;
@@ -140,6 +138,12 @@ FocusScope {
140138 }
141139 }
142140
141+ onRightEdgePushProgressChanged: {
142+ if (rightEdgePushProgress >= 1) {
143+ priv.goneToSpread = true
144+ }
145+ }
146+
143147 GSettings {
144148 id: lifecycleExceptions
145149 schema.id: "com.canonical.qtmir"
@@ -448,7 +452,7 @@ FocusScope {
448452 PropertyChanges { target: wallpaper; visible: false }
449453 },
450454 State {
451− name: "stagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "staged"
455+ name: "stagedRightEdge"; when: (rightEdgeDragArea.dragging || rightEdgePushProgress > 0) && root.mode == "staged"
452456 PropertyChanges {
453457 target: blurLayer;
454458 visible: true;
@@ -458,7 +462,7 @@ FocusScope {
458462 }
459463 },
460464 State {
461− name: "sideStagedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "stagedWithSideStage"
465+ name: "sideStagedRightEdge"; when: (rightEdgeDragArea.dragging || rightEdgePushProgress > 0) && root.mode == "stagedWithSideStage"
462466 extend: "stagedRightEdge"
463467 PropertyChanges {
464468 target: sideStage
@@ -467,13 +471,13 @@ FocusScope {
467471 }
468472 },
469473 State {
470− name: "windowedRightEdge"; when: (rightEdgeDragArea.dragging || edgeBarrier.progress > 0) && root.mode == "windowed"
474+ name: "windowedRightEdge"; when: (rightEdgeDragArea.dragging || rightEdgePushProgress > 0) && root.mode == "windowed"
471475 PropertyChanges {
472476 target: blurLayer;
473477 visible: true
474478 blurRadius: 32
475479 brightness: .65
476− opacity: MathUtils.linearAnimation(spreadItem.rightEdgeBreakPoint, 1, 0, 1, Math.max(rightEdgeDragArea.dragging ? rightEdgeDragArea.progress : 0, edgeBarrier.progress))
480+ opacity: MathUtils.linearAnimation(spreadItem.rightEdgeBreakPoint, 1, 0, 1, Math.max(rightEdgeDragArea.dragging ? rightEdgeDragArea.progress : 0, rightEdgePushProgress))
477481 }
478482 },
479483 State {
@@ -1129,7 +1133,7 @@ FocusScope {
11291133 when: (root.mode == "staged" || root.mode == "stagedWithSideStage") && (root.state == "sideStagedRightEdge" || root.state == "stagedRightEdge" || rightEdgeFocusAnimation.running || hidingAnimation.running)
11301134 PropertyChanges {
11311135 target: stagedRightEdgeMaths
1132− progress: Math.max(edgeBarrier.progress, rightEdgeDragArea.draggedProgress)
1136+ progress: Math.max(rightEdgePushProgress, rightEdgeDragArea.draggedProgress)
11331137 }
11341138 PropertyChanges {
11351139 target: appDelegate
@@ -1156,11 +1160,11 @@ FocusScope {
11561160 },
11571161 State {
11581162 name: "windowedRightEdge"
1159− when: root.mode == "windowed" && (root.state == "windowedRightEdge" || rightEdgeFocusAnimation.running || hidingAnimation.running || edgeBarrier.progress > 0)
1163+ when: root.mode == "windowed" && (root.state == "windowedRightEdge" || rightEdgeFocusAnimation.running || hidingAnimation.running || rightEdgePushProgress > 0)
11601164 PropertyChanges {
11611165 target: windowedRightEdgeMaths
11621166 swipeProgress: rightEdgeDragArea.dragging ? rightEdgeDragArea.progress : 0
1163− pushProgress: edgeBarrier.progress
1167+ pushProgress: rightEdgePushProgress
11641168 }
11651169 PropertyChanges {
11661170 target: appDelegate
@@ -1675,30 +1679,6 @@ FocusScope {
16751679 appContainerHeight: appContainer.height
16761680 }
16771681
1678− EdgeBarrier {
1679− id: edgeBarrier
1680−
1681− // NB: it does its own positioning according to the specified edge
1682− edge: Qt.RightEdge
1683−
1684− onPassed: priv.goneToSpread = true;
1685−
1686− material: Component {
1687− Item {
1688− Rectangle {
1689− width: parent.height
1690− height: parent.width
1691− rotation: 90
1692− anchors.centerIn: parent
1693− gradient: Gradient {
1694− GradientStop { position: 0.0; color: Qt.rgba(0.16,0.16,0.16,0.5)}
1695− GradientStop { position: 1.0; color: Qt.rgba(0.16,0.16,0.16,0)}
1696− }
1697− }
1698− }
1699− }
1700− }
1701−
17021682 MouseArea {
17031683 id: hoverMouseArea
17041684 objectName: "hoverMouseArea"