on xenial help sign in
reintroduce locked property in stages to not allow dragging them away while in spread
4486d2bMichael Zanetti
qml/Shell.qml+12−1
@@ -166,7 +166,16 @@ FocusScope {
166
166
167 visible: !fullyHidden && !ApplicationManager.empty
167 visible: !fullyHidden && !ApplicationManager.empty
168
168
169+ x: {
170+ if (shown) {
171+ if (locked) {
172+ return 0;
173+ }
174+ return launcher.progress;
175+ } else {
169− x: shown ? launcher.progress : stagesDragArea.progress
176+ return stagesDragArea.progress
177+ }
178+ }
170 Behavior on x { SmoothedAnimation { velocity: 600; duration: UbuntuAnimation.FastDuration } }
179 Behavior on x { SmoothedAnimation { velocity: 600; duration: UbuntuAnimation.FastDuration } }
171
180
172 property bool shown: false
181 property bool shown: false
@@ -191,6 +200,8 @@ FocusScope {
191 property bool fullyShown: x == 0
200 property bool fullyShown: x == 0
192 property bool fullyHidden: x == width
201 property bool fullyHidden: x == width
193
202
203+ property bool locked: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.locked : false
204+
194 // It might technically not be fullyShown but visually it just looks so.
205 // It might technically not be fullyShown but visually it just looks so.
195 property bool roughlyFullyShown: x >= 0 && x <= units.gu(1)
206 property bool roughlyFullyShown: x >= 0 && x <= units.gu(1)
196
207
qml/Stages/PhoneStage.qml+1−1
@@ -31,7 +31,7 @@ Item {
31
31
32 // State information propagated to the outside
32 // State information propagated to the outside
33 property bool fullscreen: priv.focusedApplication ? priv.focusedApplication.fullscreen : false
33 property bool fullscreen: priv.focusedApplication ? priv.focusedApplication.fullscreen : false
34− property bool locked: spreadView.visible
34+ property bool locked: spreadView.phase == 2
35
35
36 function select(appId) {
36 function select(appId) {
37 spreadView.snapTo(priv.indexOf(appId))
37 spreadView.snapTo(priv.indexOf(appId))
qml/Stages/TabletStage.qml+2−1
@@ -31,12 +31,13 @@ Item {
31 property bool moving: false
31 property bool moving: false
32 property int dragAreaWidth
32 property int dragAreaWidth
33 property real maximizedAppTopMargin
33 property real maximizedAppTopMargin
34+ property bool interactive
34
35
35 // State information propagated to the outside
36 // State information propagated to the outside
36 readonly property bool painting: true
37 readonly property bool painting: true
37 property bool fullscreen: true
38 property bool fullscreen: true
38 property bool overlayMode: false
39 property bool overlayMode: false
39− property bool interactive
40+ property bool locked: spreadView.phase == 2
40
41
41 readonly property int overlayWidth: priv.overlayOverride ? 0 : spreadView.sideStageWidth
42 readonly property int overlayWidth: priv.overlayOverride ? 0 : spreadView.sideStageWidth
42
43