on xenial help sign in
reintroduce locked property in stages to not allow dragging them away while in spread
commit4486d2b4e9dfd8c0976630426b2f0ef3494827c3 authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 17 Jul 2014, 16:11 (12 years ago) parent22ce931
3 files changed+15−3
qml/Shell.qml+12−1 qml/Stages/PhoneStage.qml+1−1 qml/Stages/TabletStage.qml+2−1
qml/Shell.qml+12−1
@@ -166,7 +166,16 @@ FocusScope {
166166
167167 visible: !fullyHidden && !ApplicationManager.empty
168168
169− x: shown ? launcher.progress : stagesDragArea.progress
169+ x: {
170+ if (shown) {
171+ if (locked) {
172+ return 0;
173+ }
174+ return launcher.progress;
175+ } else {
176+ return stagesDragArea.progress
177+ }
178+ }
170179 Behavior on x { SmoothedAnimation { velocity: 600; duration: UbuntuAnimation.FastDuration } }
171180
172181 property bool shown: false
@@ -191,6 +200,8 @@ FocusScope {
191200 property bool fullyShown: x == 0
192201 property bool fullyHidden: x == width
193202
203+ property bool locked: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.locked : false
204+
194205 // It might technically not be fullyShown but visually it just looks so.
195206 property bool roughlyFullyShown: x >= 0 && x <= units.gu(1)
196207
qml/Stages/PhoneStage.qml+1−1
@@ -31,7 +31,7 @@ Item {
3131
3232 // State information propagated to the outside
3333 property bool fullscreen: priv.focusedApplication ? priv.focusedApplication.fullscreen : false
34− property bool locked: spreadView.visible
34+ property bool locked: spreadView.phase == 2
3535
3636 function select(appId) {
3737 spreadView.snapTo(priv.indexOf(appId))
qml/Stages/TabletStage.qml+2−1
@@ -31,12 +31,13 @@ Item {
3131 property bool moving: false
3232 property int dragAreaWidth
3333 property real maximizedAppTopMargin
34+ property bool interactive
3435
3536 // State information propagated to the outside
3637 readonly property bool painting: true
3738 property bool fullscreen: true
3839 property bool overlayMode: false
39− property bool interactive
40+ property bool locked: spreadView.phase == 2
4041
4142 readonly property int overlayWidth: priv.overlayOverride ? 0 : spreadView.sideStageWidth
4243