on xenial help sign in
don't allow swiping away the spread
69020cdMichael Zanetti
qml/Shell.qml+6−1
@@ -203,7 +203,7 @@ FocusScope {
203 width: parent.width
203 width: parent.width
204 height: parent.height
204 height: parent.height
205
205
206− x: shown ? launcher.progress : stagesDragHandle.progress
206+ x: shown ? (locked ? 0 : launcher.progress) : stagesDragHandle.progress
207
207
208 Behavior on x { SmoothedAnimation { velocity: 600; duration: UbuntuAnimation.FastDuration } }
208 Behavior on x { SmoothedAnimation { velocity: 600; duration: UbuntuAnimation.FastDuration } }
209
209
@@ -216,6 +216,7 @@ FocusScope {
216
216
217 property bool painting: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.painting : false
217 property bool painting: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.painting : false
218 property bool fullscreen: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.fullscreen : false
218 property bool fullscreen: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.fullscreen : false
219+ property bool locked: applicationsDisplayLoader.item ? applicationsDisplayLoader.item.locked : false
219
220
220 function show() {
221 function show() {
221 shown = true;
222 shown = true;
@@ -226,6 +227,10 @@ FocusScope {
226 }
227 }
227
228
228 function hide() {
229 function hide() {
230+ if (locked) {
231+ return;
232+ }
233+
229 shown = false;
234 shown = false;
230 if (ApplicationManager.focusedApplicationId) {
235 if (ApplicationManager.focusedApplicationId) {
231 ApplicationManager.unfocusCurrentApplication();
236 ApplicationManager.unfocusCurrentApplication();
qml/Stages/PhoneStage.qml+2
@@ -20,6 +20,7 @@ Item {
20 // State information propagated to the outside
20 // State information propagated to the outside
21 readonly property bool painting: mainScreenshotImage.visible || fadeInScreenshotImage.visible || appSplash.visible || spreadView.visible
21 readonly property bool painting: mainScreenshotImage.visible || fadeInScreenshotImage.visible || appSplash.visible || spreadView.visible
22 property bool fullscreen: ApplicationManager.findApplication(ApplicationManager.focusedApplicationId).fullscreen
22 property bool fullscreen: ApplicationManager.findApplication(ApplicationManager.focusedApplicationId).fullscreen
23+ property bool locked: spreadView.visible
23
24
24 onMovingChanged: {
25 onMovingChanged: {
25 if (moving) {
26 if (moving) {
@@ -395,6 +396,7 @@ Item {
395 if (index == 1 && spreadView.stage < 2) {
396 if (index == 1 && spreadView.stage < 2) {
396 tileProgress += spreadView.tileDistance / spreadView.width
397 tileProgress += spreadView.tileDistance / spreadView.width
397 }
398 }
399+ print("returning tile progress!!!", tileProgress, spreadView.shiftedContentX, spreadView.shift, spreadView.contentX )
398 return tileProgress;
400 return tileProgress;
399 }
401 }
400
402