on xenial help sign in
sync fixes from trunk
commitc11e9a7cac1fd691cd01bc46be344f8191bda931 authorMichael Zanetti <michael.zanetti@canonical.com> dateWed 4 Jun 2014, 18:24 (12 years ago) parent50da7a7
2 files changed+18−8
qml/Stages/TabletStage.qml+17−7 qml/Stages/TransformedTabletSpreadDelegate.qml+1−1
qml/Stages/TabletStage.qml+17−7
@@ -109,6 +109,15 @@ Item {
109109 ApplicationManager.focusApplication(appId)
110110 }
111111 }
112+
113+ onApplicationRemoved: {
114+ if (priv.mainStageAppId == appId) {
115+ priv.mainStageAppId = "";
116+ }
117+ if (priv.sideStageAppId == appId) {
118+ priv.sideStageAppId = "";
119+ }
120+ }
112121 }
113122
114123 function printStack() {
@@ -310,13 +319,11 @@ Item {
310319
311320 Rectangle {
312321 id: spreadRow
322+ color: "black"
313323 x: spreadView.contentX
314324 height: root.height
315−// width: root.width
316325 width: spreadView.width + Math.max(spreadView.width, ApplicationManager.count * spreadView.tileDistance)
317326
318− color: "black"
319−
320327 Repeater {
321328 id: spreadRepeater
322329 model: ApplicationManager
@@ -427,10 +434,13 @@ Item {
427434 gesturePoints.push(mouseX);
428435 }
429436 onReleased: {
430− var oneWayFlick = priv.evaluateOneWayFlick(gesturePoints);
431− gesturePoints = [];
432− sideStageDragSnapAnimation.to = sideStageDragHandle.progress > 0.5 || oneWayFlick ? 1 : 0
433− sideStageDragSnapAnimation.start();
437+ if (priv.mainStageAppId) {
438+ var oneWayFlick = priv.evaluateOneWayFlick(gesturePoints);
439+ sideStageDragSnapAnimation.to = sideStageDragHandle.progress > 0.5 || oneWayFlick ? 1 : 0
440+ sideStageDragSnapAnimation.start();
441+ } else {
442+ sideStageDragHandle.dragging = false;
443+ }
434444 }
435445 }
436446 UbuntuNumberAnimation {
qml/Stages/TransformedTabletSpreadDelegate.qml+1−1
@@ -129,7 +129,6 @@ SpreadDelegate {
129129 property real xTranslate: {
130130 var newTranslate = 0;
131131
132− print("zIndex:", zIndex, "index", index)
133132 if (otherSelected) {
134133 return priv.selectedXTranslate
135134 }
@@ -256,6 +255,7 @@ SpreadDelegate {
256255 }
257256
258257 // The tile should rotate a bit when another one comes on top, but not when only dragging the side stage in
258+// print("nextinstack", spreadView.nextInStack, ApplicationManager.count)
259259 var shouldMoveAway = spreadView.nextInStack >= 0 && movedActive && (ApplicationManager.get(spreadView.nextInStack).stage === ApplicationInfoInterface.MainStage || model.stage == ApplicationInfoInterface.SideStage)
260260
261261 if (spreadView.phase == 0) {