on xenial help sign in
What I have so far
commit1e319e9fc26463bf2f64bcf19d1a0c12684879dc authorGerry Boland <gerry.boland@canonical.com> dateThu 5 Jun 2014, 13:46 (12 years ago) parent4c569ed247b1c9
2 files changed+12−12
qml/Stages/PhoneStage.qml+3−4 qml/Stages/TabletStage.qml+9−8
qml/Stages/PhoneStage.qml+3−4
@@ -36,8 +36,7 @@ Rectangle {
3636 function select(appId) {
3737 spreadView.snapTo(priv.indexOf(appId))
3838 }
39−Component.onCompleted: print("PhoneStage created", root)
40−Component.onDestruction: print("PhoneStage destroyed", root)
39+
4140 onWidthChanged: {
4241 spreadView.selectedIndex = -1;
4342 spreadView.phase = 0;
@@ -58,7 +57,7 @@ Component.onDestruction: print("PhoneStage destroyed", root)
5857 onFocusedApplicationIdChanged: {
5958 if (ApplicationManager.focusedApplicationId.length > 0) {
6059 if (priv.secondApplicationStarting || priv.applicationStarting) {
61− //appSplashTimer.restart(); REMOVEME
60+ appSplashTimer.restart();
6261 } else {
6362 var application = priv.focusedApplication;
6463 root.fullscreen = application.fullscreen;
@@ -110,7 +109,7 @@ Component.onDestruction: print("PhoneStage destroyed", root)
110109 Rectangle {
111110 id: coverFlipBackground
112111 anchors.fill: parent
113− color: "blue"
112+ color: "black"
114113 visible: spreadView.visible
115114 }
116115
qml/Stages/TabletStage.qml+9−8
@@ -112,6 +112,7 @@ Item {
112112 }
113113
114114 onApplicationRemoved: {
115+ printStack()
115116 if (priv.mainStageAppId == appId) {
116117 priv.mainStageAppId = "";
117118 }
@@ -119,6 +120,9 @@ Item {
119120 priv.sideStageAppId = "";
120121 }
121122 }
123+ onApplicationAdded: {
124+ printStack()
125+ }
122126 }
123127
124128 function printStack() {
@@ -260,14 +264,12 @@ Item {
260264 // We don't want to really reorder them in the model because that allows us to keep track
261265 // of the last focused order.
262266 function indexToZIndex(index) {
263− print("zIndex calc for index", index);
264267 var app = ApplicationManager.get(index);
265268 if (!app) {
266269 return index;
267270 }
268271
269272 var isActive = app.appId == priv.mainStageAppId || app.appId == priv.sideStageAppId;
270− print("got app", app.appId, isActive)
271273 if (isActive && app.stage == ApplicationInfoInterface.MainStage) return 0;
272274 if (isActive && app.stage == ApplicationInfoInterface.SideStage) {
273275 if (!priv.mainStageAppId) {
@@ -290,6 +292,9 @@ Item {
290292 }
291293 return 1;
292294 }
295+ if (index == 2 && spreadView.nextInStack == 1 && priv.sideStageAppId) {
296+ return 3;
297+ }
293298 return index;
294299 }
295300
@@ -320,13 +325,11 @@ Item {
320325
321326 Rectangle {
322327 id: spreadRow
323− //color: "black"
328+ color: "black"
324329 x: spreadView.contentX
325330 height: root.height
326331 width: spreadView.width + Math.max(spreadView.width, ApplicationManager.count * spreadView.tileDistance)
327332
328− color: "transparent"
329−
330333 Repeater {
331334 id: spreadRepeater
332335 model: ApplicationManager
@@ -337,9 +340,6 @@ Item {
337340 width: model.stage == ApplicationInfoInterface.MainStage ? spreadView.width : spreadView.sideStageWidth
338341 x: spreadView.width
339342 z: spreadView.indexToZIndex(index)
340−
341− onWidthChanged: print("width changed!", width)
342−
343343 active: model.appId == priv.mainStageAppId || model.appId == priv.sideStageAppId
344344 zIndex: z
345345 selected: spreadView.selectedIndex == index
@@ -425,6 +425,7 @@ Item {
425425 anchors.fill: parent
426426 property int startX
427427 property var gesturePoints: new Array()
428+ enabled: spreadView.contentX == 0
428429 onPressed: {
429430 gesturePoints = [];
430431 startX = mouseX;