on xenial help sign in
What I have so far
1e319e9Gerry Boland
qml/Stages/PhoneStage.qml+3−4
@@ -36,8 +36,7 @@ Rectangle {
36 function select(appId) {
36 function select(appId) {
37 spreadView.snapTo(priv.indexOf(appId))
37 spreadView.snapTo(priv.indexOf(appId))
38 }
38 }
39−Component.onCompleted: print("PhoneStage created", root)
39+
40−Component.onDestruction: print("PhoneStage destroyed", root)
41 onWidthChanged: {
40 onWidthChanged: {
42 spreadView.selectedIndex = -1;
41 spreadView.selectedIndex = -1;
43 spreadView.phase = 0;
42 spreadView.phase = 0;
@@ -58,7 +57,7 @@ Component.onDestruction: print("PhoneStage destroyed", root)
58 onFocusedApplicationIdChanged: {
57 onFocusedApplicationIdChanged: {
59 if (ApplicationManager.focusedApplicationId.length > 0) {
58 if (ApplicationManager.focusedApplicationId.length > 0) {
60 if (priv.secondApplicationStarting || priv.applicationStarting) {
59 if (priv.secondApplicationStarting || priv.applicationStarting) {
61− //appSplashTimer.restart(); REMOVEME
60+ appSplashTimer.restart();
62 } else {
61 } else {
63 var application = priv.focusedApplication;
62 var application = priv.focusedApplication;
64 root.fullscreen = application.fullscreen;
63 root.fullscreen = application.fullscreen;
@@ -110,7 +109,7 @@ Component.onDestruction: print("PhoneStage destroyed", root)
110 Rectangle {
109 Rectangle {
111 id: coverFlipBackground
110 id: coverFlipBackground
112 anchors.fill: parent
111 anchors.fill: parent
113− color: "blue"
112+ color: "black"
114 visible: spreadView.visible
113 visible: spreadView.visible
115 }
114 }
116
115
qml/Stages/TabletStage.qml+9−8
@@ -112,6 +112,7 @@ Item {
112 }
112 }
113
113
114 onApplicationRemoved: {
114 onApplicationRemoved: {
115+ printStack()
115 if (priv.mainStageAppId == appId) {
116 if (priv.mainStageAppId == appId) {
116 priv.mainStageAppId = "";
117 priv.mainStageAppId = "";
117 }
118 }
@@ -119,6 +120,9 @@ Item {
119 priv.sideStageAppId = "";
120 priv.sideStageAppId = "";
120 }
121 }
121 }
122 }
123+ onApplicationAdded: {
124+ printStack()
125+ }
122 }
126 }
123
127
124 function printStack() {
128 function printStack() {
@@ -260,14 +264,12 @@ Item {
260 // We don't want to really reorder them in the model because that allows us to keep track
264 // We don't want to really reorder them in the model because that allows us to keep track
261 // of the last focused order.
265 // of the last focused order.
262 function indexToZIndex(index) {
266 function indexToZIndex(index) {
263− print("zIndex calc for index", index);
264 var app = ApplicationManager.get(index);
267 var app = ApplicationManager.get(index);
265 if (!app) {
268 if (!app) {
266 return index;
269 return index;
267 }
270 }
268
271
269 var isActive = app.appId == priv.mainStageAppId || app.appId == priv.sideStageAppId;
272 var isActive = app.appId == priv.mainStageAppId || app.appId == priv.sideStageAppId;
270− print("got app", app.appId, isActive)
271 if (isActive && app.stage == ApplicationInfoInterface.MainStage) return 0;
273 if (isActive && app.stage == ApplicationInfoInterface.MainStage) return 0;
272 if (isActive && app.stage == ApplicationInfoInterface.SideStage) {
274 if (isActive && app.stage == ApplicationInfoInterface.SideStage) {
273 if (!priv.mainStageAppId) {
275 if (!priv.mainStageAppId) {
@@ -290,6 +292,9 @@ Item {
290 }
292 }
291 return 1;
293 return 1;
292 }
294 }
295+ if (index == 2 && spreadView.nextInStack == 1 && priv.sideStageAppId) {
296+ return 3;
297+ }
293 return index;
298 return index;
294 }
299 }
295
300
@@ -320,13 +325,11 @@ Item {
320
325
321 Rectangle {
326 Rectangle {
322 id: spreadRow
327 id: spreadRow
323− //color: "black"
328+ color: "black"
324 x: spreadView.contentX
329 x: spreadView.contentX
325 height: root.height
330 height: root.height
326 width: spreadView.width + Math.max(spreadView.width, ApplicationManager.count * spreadView.tileDistance)
331 width: spreadView.width + Math.max(spreadView.width, ApplicationManager.count * spreadView.tileDistance)
327
332
328− color: "transparent"
329−
330 Repeater {
333 Repeater {
331 id: spreadRepeater
334 id: spreadRepeater
332 model: ApplicationManager
335 model: ApplicationManager
@@ -337,9 +340,6 @@ Item {
337 width: model.stage == ApplicationInfoInterface.MainStage ? spreadView.width : spreadView.sideStageWidth
340 width: model.stage == ApplicationInfoInterface.MainStage ? spreadView.width : spreadView.sideStageWidth
338 x: spreadView.width
341 x: spreadView.width
339 z: spreadView.indexToZIndex(index)
342 z: spreadView.indexToZIndex(index)
340−
341− onWidthChanged: print("width changed!", width)
342−
343 active: model.appId == priv.mainStageAppId || model.appId == priv.sideStageAppId
343 active: model.appId == priv.mainStageAppId || model.appId == priv.sideStageAppId
344 zIndex: z
344 zIndex: z
345 selected: spreadView.selectedIndex == index
345 selected: spreadView.selectedIndex == index
@@ -425,6 +425,7 @@ Item {
425 anchors.fill: parent
425 anchors.fill: parent
426 property int startX
426 property int startX
427 property var gesturePoints: new Array()
427 property var gesturePoints: new Array()
428+ enabled: spreadView.contentX == 0
428 onPressed: {
429 onPressed: {
429 gesturePoints = [];
430 gesturePoints = [];
430 startX = mouseX;
431 startX = mouseX;