on xenial help sign in
don't allow swiping away the spread
commit69020cdd13291eb60222efb2ebebdd6f00f48501 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 18 Feb 2014, 13:01 (13 years ago) parent6b4e728
2 files changed+8−1
qml/Shell.qml+6−1 qml/Stages/PhoneStage.qml+2
qml/Shell.qml+6−1
@@ -203,7 +203,7 @@ FocusScope {
203203 width: parent.width
204204 height: parent.height
205205
206− x: shown ? launcher.progress : stagesDragHandle.progress
206+ x: shown ? (locked ? 0 : launcher.progress) : stagesDragHandle.progress
207207
208208 Behavior on x { SmoothedAnimation { velocity: 600; duration: UbuntuAnimation.FastDuration } }
209209
@@ -216,6 +216,7 @@ FocusScope {
216216
217217 property bool painting: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.painting : false
218218 property bool fullscreen: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.fullscreen : false
219+ property bool locked: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.locked : false
219220
220221 function show() {
221222 shown = true;
@@ -226,6 +227,10 @@ FocusScope {
226227 }
227228
228229 function hide() {
230+ if (locked) {
231+ return;
232+ }
233+
229234 shown = false;
230235 if (ApplicationManager.focusedApplicationId) {
231236 ApplicationManager.unfocusCurrentApplication();
qml/Stages/PhoneStage.qml+2
@@ -20,6 +20,7 @@ Item {
2020 // State information propagated to the outside
2121 readonly property bool painting: mainScreenshotImage.visible || fadeInScreenshotImage.visible || appSplash.visible || spreadView.visible
2222 property bool fullscreen: ApplicationManager.findApplication(ApplicationManager.focusedApplicationId).fullscreen
23+ property bool locked: spreadView.visible
2324
2425 onMovingChanged: {
2526 if (moving) {
@@ -395,6 +396,7 @@ Item {
395396 if (index == 1 && spreadView.stage < 2) {
396397 tileProgress += spreadView.tileDistance / spreadView.width
397398 }
399+ print("returning tile progress!!!", tileProgress, spreadView.shiftedContentX, spreadView.shift, spreadView.contentX )
398400 return tileProgress;
399401 }
400402