on xenial help sign in
more work on side stage mode
6c15ac4Michael Zanetti
debian/changelog+6
@@ -1,3 +1,9 @@
1+unity8 (8.12+16.10.20160627.5-0ubuntu1local~1468240753) UNRELEASED; urgency=medium
2+
3+ * ''
4+
5+ -- Michael Zanetti <michael.zanetti@canonical.com> Mon, 11 Jul 2016 14:39:14 +0200
6+
1unity8 (8.12+16.10.20160627.5-0ubuntu1) yakkety; urgency=medium
7unity8 (8.12+16.10.20160627.5-0ubuntu1) yakkety; urgency=medium
2
8
3 [ Albert Astals Cid ]
9 [ Albert Astals Cid ]
po/unity8.pot+2−2
@@ -1,6 +1,6 @@
1# SOME DESCRIPTIVE TITLE.
1# SOME DESCRIPTIVE TITLE.
2# Copyright (C) YEAR Canonical Ltd.
2# Copyright (C) YEAR Canonical Ltd.
3−# This file is distributed under the same license as the PACKAGE package.
3+# This file is distributed under the same license as the unity8 package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
4# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5#
5#
6#, fuzzy
6#, fuzzy
@@ -8,7 +8,7 @@ msgid ""
8msgstr ""
8msgstr ""
9"Project-Id-Version: unity8\n"
9"Project-Id-Version: unity8\n"
10"Report-Msgid-Bugs-To: \n"
10"Report-Msgid-Bugs-To: \n"
11−"POT-Creation-Date: 2016-06-27 18:49+0000\n"
11+"POT-Creation-Date: 2016-07-11 14:39+0200\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
qml/Stages/DesktopStage.qml+35−2
@@ -208,6 +208,8 @@ AbstractStage {
208
208
209 print("*** updated! MainStage:", priv.mainStageAppId, "SideStage:", priv.sideStageAppId)
209 print("*** updated! MainStage:", priv.mainStageAppId, "SideStage:", priv.sideStageAppId)
210 }
210 }
211+
212+ property int nextInStack: 1
211 }
213 }
212
214
213 Connections {
215 Connections {
@@ -302,6 +304,7 @@ AbstractStage {
302 State {
304 State {
303 name: "stagedWithSideStage"; when: root.mode === "stagedWithSideStage"
305 name: "stagedWithSideStage"; when: root.mode === "stagedWithSideStage"
304 PropertyChanges { target: triGestureArea; enabled: true }
306 PropertyChanges { target: triGestureArea; enabled: true }
307+ PropertyChanges { target: priv; nextInStack: priv.sideStageDelegate ? 3 : 2 }
305 },
308 },
306 State {
309 State {
307 name: "windowed"; when: root.mode === "windowed"
310 name: "windowed"; when: root.mode === "windowed"
@@ -353,6 +356,21 @@ AbstractStage {
353 shown: false
356 shown: false
354 height: appContainer.height
357 height: appContainer.height
355 x: appContainer.width - width
358 x: appContainer.width - width
359+ z: {
360+ if (!priv.mainStageItemId) return 0;
361+
362+ if (priv.sideStageItemId && priv.nextInStack > 0) {
363+ var nextDelegateInStack = appRepeater.itemAt(priv.nextInStack);
364+
365+ if (nextDelegateInStack.stage === ApplicationInfoInterface.MainStage) {
366+ // if the next app in stack is a main stage app, put the sidestage on top of it.
367+ return 2;
368+ }
369+ return 1;
370+ }
371+
372+ return 2;
373+ }
356
374
357 DropArea {
375 DropArea {
358 id: sideStageDropArea
376 id: sideStageDropArea
@@ -469,9 +487,10 @@ AbstractStage {
469 property bool visuallyMinimized: false
487 property bool visuallyMinimized: false
470
488
471 property int stage: ApplicationInfoInterface.MainStage
489 property int stage: ApplicationInfoInterface.MainStage
472− function saveStage(stage) {
490+ function saveStage(newStage) {
473− appDelegate.stage = stage;
491+ appDelegate.stage = newStage;
474 WindowStateStorage.saveStage(application.appId, newStage);
492 WindowStateStorage.saveStage(application.appId, newStage);
493+ priv.updateMainAndSideStageIndexes()
475 }
494 }
476
495
477 readonly property var surface: model.surface
496 readonly property var surface: model.surface
@@ -568,6 +587,12 @@ AbstractStage {
568
587
569 onVisuallyMaximizedChanged: priv.updateForegroundMaximizedApp()
588 onVisuallyMaximizedChanged: priv.updateForegroundMaximizedApp()
570
589
590+ onStageChanged: {
591+ if (!_constructing) {
592+ priv.updateMainAndSideStageIndexes();
593+ }
594+ }
595+
571// visible: (
596// visible: (
572// !visuallyMinimized
597// !visuallyMinimized
573// && !greeter.fullyShown
598// && !greeter.fullyShown
@@ -670,6 +695,8 @@ AbstractStage {
670 thisDelegate: appDelegate
695 thisDelegate: appDelegate
671 mainStageDelegate: priv.mainStageDelegate
696 mainStageDelegate: priv.mainStageDelegate
672 sideStageDelegate: priv.sideStageDelegate
697 sideStageDelegate: priv.sideStageDelegate
698+ sideStageWidth: sideStage.panelWidth
699+ sideStageX: sideStage.x
673 }
700 }
674
701
675 StagedRightEdgeMaths {
702 StagedRightEdgeMaths {
@@ -758,6 +785,7 @@ AbstractStage {
758 target: appDelegate
785 target: appDelegate
759 x: stageMaths.itemX
786 x: stageMaths.itemX
760 y: appDelegate.fullscreen ? 0 : PanelState.panelHeight
787 y: appDelegate.fullscreen ? 0 : PanelState.panelHeight
788+ z: stageMaths.itemZ
761 requestedWidth: stageMaths.itemWidth
789 requestedWidth: stageMaths.itemWidth
762 requestedHeight: appContainer.height - PanelState.panelHeight
790 requestedHeight: appContainer.height - PanelState.panelHeight
763 visuallyMaximized: true
791 visuallyMaximized: true
@@ -1251,4 +1279,9 @@ AbstractStage {
1251 }
1279 }
1252 }
1280 }
1253 }
1281 }
1282+
1283+ Label {
1284+ anchors { left: parent.left; top: parent.top; margins: units.gu(4) }
1285+ text: "sidestage z: " + sideStage.z
1286+ }
1254}
1287}
qml/Stages/StageMaths.qml+10−4
@@ -7,7 +7,8 @@ QtObject {
7 // input
7 // input
8 property int itemIndex: 0
8 property int itemIndex: 0
9 property int sceneWidth: 0
9 property int sceneWidth: 0
10− property int sideStageWidth: units.gu(40)
10+ property int sideStageWidth: 0
11+ property int sideStageX: sceneWidth
11
12
12 property int stage: ApplicationInfoInterface.MainStage
13 property int stage: ApplicationInfoInterface.MainStage
13 property var thisDelegate: null
14 property var thisDelegate: null
@@ -15,10 +16,15 @@ QtObject {
15 property var sideStageDelegate: null
16 property var sideStageDelegate: null
16
17
17 // output
18 // output
18− readonly property int itemX: stage == ApplicationInfoInterface.MainStage ? 0 :
19+ readonly property int itemZ: stage == ApplicationInfoInterface.MainStage ? 0 :
19− stage == ApplicationInfoInterface.SideStage ? sceneWidth - sideStageWidth :
20+ stage == ApplicationInfoInterface.SideStage ? 2 :
21+ itemIndex + 2
22+
23+ readonly property int itemX: mainStageDelegate == thisDelegate ? 0 :
24+ sideStageDelegate == thisDelegate ? sideStageX :
20 sceneWidth
25 sceneWidth
21
26
22− readonly property int itemWidth: stage == ApplicationInfoInterface.MainStage ? sceneWidth - sideStageWidth :
27+ readonly property int itemWidth: stage == ApplicationInfoInterface.MainStage ?
28+ sideStageDelegate != null ? sideStageX : sceneWidth :
23 stage == ApplicationInfoInterface.SideStage ? sideStageWidth : sceneWidth
29 stage == ApplicationInfoInterface.SideStage ? sideStageWidth : sceneWidth
24}
30}