on xenial help sign in
sync fixes from trunk
c11e9a7Michael Zanetti
qml/Stages/TabletStage.qml+17−7
@@ -109,6 +109,15 @@ Item {
109 ApplicationManager.focusApplication(appId)
109 ApplicationManager.focusApplication(appId)
110 }
110 }
111 }
111 }
112+
113+ onApplicationRemoved: {
114+ if (priv.mainStageAppId == appId) {
115+ priv.mainStageAppId = "";
116+ }
117+ if (priv.sideStageAppId == appId) {
118+ priv.sideStageAppId = "";
119+ }
120+ }
112 }
121 }
113
122
114 function printStack() {
123 function printStack() {
@@ -310,13 +319,11 @@ Item {
310
319
311 Rectangle {
320 Rectangle {
312 id: spreadRow
321 id: spreadRow
322+ color: "black"
313 x: spreadView.contentX
323 x: spreadView.contentX
314 height: root.height
324 height: root.height
315−// width: root.width
316 width: spreadView.width + Math.max(spreadView.width, ApplicationManager.count * spreadView.tileDistance)
325 width: spreadView.width + Math.max(spreadView.width, ApplicationManager.count * spreadView.tileDistance)
317
326
318− color: "black"
319−
320 Repeater {
327 Repeater {
321 id: spreadRepeater
328 id: spreadRepeater
322 model: ApplicationManager
329 model: ApplicationManager
@@ -427,10 +434,13 @@ Item {
427 gesturePoints.push(mouseX);
434 gesturePoints.push(mouseX);
428 }
435 }
429 onReleased: {
436 onReleased: {
437+ if (priv.mainStageAppId) {
430− var oneWayFlick = priv.evaluateOneWayFlick(gesturePoints);
438+ var oneWayFlick = priv.evaluateOneWayFlick(gesturePoints);
431− gesturePoints = [];
432− sideStageDragSnapAnimation.to = sideStageDragHandle.progress > 0.5 || oneWayFlick ? 1 : 0
439+ sideStageDragSnapAnimation.to = sideStageDragHandle.progress > 0.5 || oneWayFlick ? 1 : 0
433− sideStageDragSnapAnimation.start();
440+ sideStageDragSnapAnimation.start();
441+ } else {
442+ sideStageDragHandle.dragging = false;
443+ }
434 }
444 }
435 }
445 }
436 UbuntuNumberAnimation {
446 UbuntuNumberAnimation {
qml/Stages/TransformedTabletSpreadDelegate.qml+1−1
@@ -129,7 +129,6 @@ SpreadDelegate {
129 property real xTranslate: {
129 property real xTranslate: {
130 var newTranslate = 0;
130 var newTranslate = 0;
131
131
132− print("zIndex:", zIndex, "index", index)
133 if (otherSelected) {
132 if (otherSelected) {
134 return priv.selectedXTranslate
133 return priv.selectedXTranslate
135 }
134 }
@@ -256,6 +255,7 @@ SpreadDelegate {
256 }
255 }
257
256
258 // The tile should rotate a bit when another one comes on top, but not when only dragging the side stage in
257 // 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)
259 var shouldMoveAway = spreadView.nextInStack >= 0 && movedActive && (ApplicationManager.get(spreadView.nextInStack).stage === ApplicationInfoInterface.MainStage || model.stage == ApplicationInfoInterface.SideStage)
259 var shouldMoveAway = spreadView.nextInStack >= 0 && movedActive && (ApplicationManager.get(spreadView.nextInStack).stage === ApplicationInfoInterface.MainStage || model.stage == ApplicationInfoInterface.SideStage)
260
260
261 if (spreadView.phase == 0) {
261 if (spreadView.phase == 0) {