@@ -30,7 +30,7 @@ QtObject {
30// onProgressChanged: if (itemIndex == 0) { print("progress", progress) }
30// onProgressChanged: if (itemIndex == 0) { print("progress", progress) }
33− property real breakPoint: 0.4
33+ property real breakPoint: units.gu(15) / sceneWidth
34 property int tileDistance: units.gu(10)
34 property int tileDistance: units.gu(10)
@@ -46,40 +46,43 @@ QtObject {
46 return progress < breakPoint ? root.sceneHeight : MathUtils.linearAnimation(breakPoint, 1, root.sceneHeight, targetHeight, progress)
46 return progress < breakPoint ? root.sceneHeight : MathUtils.linearAnimation(breakPoint, 1, root.sceneHeight, targetHeight, progress)
49− readonly property var nextStage: appRepeater.itemAt(nextInStack) ? appRepeater.itemAt(nextInStack).stage : ApplicationInfoInterface.MainStage;
51 readonly property int animatedX: {
50 readonly property int animatedX: {
52− var stageCount = (priv.mainStageDelegate ? 1 : 0) + (priv.sideStageDelegate ? 1 : 0)
54−// var nextStage = ApplicationInfoInterface.MainStage;
51+ var nextStage = appRepeater.itemAt(nextInStack) ? appRepeater.itemAt(nextInStack).stage : ApplicationInfoInterface.MainStage;
55−// if (topLevelSurfaceList.count > nextInStack) {
56−// nextStage = appRepeater.itemAt(nextInStack).stage;
59 if (model.application.appId == "unity8-dash") {
53 if (model.application.appId == "unity8-dash") {
60− print("calculating X for dash:", itemIndex, nextInStack)
54+ print("calculating X for dash:", itemIndex, nextInStack, nextStage, "(Main:", ApplicationInfoInterface.MainStage,")", appRepeater.itemAt(nextInStack).stage)
63 var startX = 0;
57 var startX = 0;
64 if (isMainStageApp) {
58 if (isMainStageApp) {
65 if (progress < breakPoint) {
59 if (progress < breakPoint) {
60+ if (nextStage == ApplicationInfoInterface.MainStage) {
66− return MathUtils.linearAnimation(0, breakPoint, 0, -units.gu(4), progress);
61+ return MathUtils.linearAnimation(0, breakPoint, 0, -units.gu(4), progress);
66+ if (nextStage == ApplicationInfoInterface.MainStage) {
68− return MathUtils.linearAnimation(breakPoint, 1, -units.gu(4), targetX, progress);
67+ return MathUtils.linearAnimation(breakPoint, 1, -units.gu(4), targetX, progress);
69+ return MathUtils.linearAnimation(breakPoint, 1, 0, targetX, progress);
70 } else if (isSideStageApp) {
72 } else if (isSideStageApp) {
71 startX = sceneWidth - sideStageWidth;
73 startX = sceneWidth - sideStageWidth;
72 } else if (itemIndex == nextInStack && itemIndex <= 2 && priv.sideStageDelegate && nextStage == ApplicationInfoInterface.MainStage) {
74 } else if (itemIndex == nextInStack && itemIndex <= 2 && priv.sideStageDelegate && nextStage == ApplicationInfoInterface.MainStage) {
73 startX = sceneWidth - sideStageWidth;
75 startX = sceneWidth - sideStageWidth;
77+ var stageCount = (priv.mainStageDelegate ? 1 : 0) + (priv.sideStageDelegate ? 1 : 0)
75 startX = sceneWidth + Math.max(0, itemIndex - stageCount - 1) * tileDistance;
78 startX = sceneWidth + Math.max(0, itemIndex - stageCount - 1) * tileDistance;
78 if (itemIndex == nextInStack) {
81 if (itemIndex == nextInStack) {
79 if (progress < breakPoint) {
82 if (progress < breakPoint) {
80− return MathUtils.linearAnimation(0, breakPoint, startX, sceneWidth / 2, progress)
83+ return MathUtils.linearAnimation(0, breakPoint, startX, startX - units.gu(15), progress)
82− return MathUtils.linearAnimation(breakPoint, 1, sceneWidth / 2, targetX, progress)
85+ return MathUtils.linearAnimation(breakPoint, 1, startX - units.gu(15), targetX, progress)
85 if (progress < breakPoint) {
88 if (progress < breakPoint) {
@@ -92,7 +95,12 @@ QtObject {
93 readonly property int animatedY: progress < breakPoint ? startY : MathUtils.linearAnimation(breakPoint, 1, startY, targetY, progress)
96 readonly property int animatedY: progress < breakPoint ? startY : MathUtils.linearAnimation(breakPoint, 1, startY, targetY, progress)
95− readonly property int animatedZ: shuffledZ
98+ readonly property int animatedZ: {
99+ if (progress < breakPoint + (1 - breakPoint) / 2) {
97 readonly property real animatedAngle: {
105 readonly property real animatedAngle: {
98 var startAngle = 0;
106 var startAngle = 0;
@@ -104,6 +112,8 @@ QtObject {
104 startAngle = root.startAngle;
112 startAngle = root.startAngle;
115+ var nextStage = appRepeater.itemAt(nextInStack) ? appRepeater.itemAt(nextInStack).stage : ApplicationInfoInterface.MainStage;
107 if (progress < breakPoint) {
117 if (progress < breakPoint) {
108 if (stage == nextStage) {
118 if (stage == nextStage) {
109 return MathUtils.linearAnimation(0, 1, startAngle, targetAngle, progress);
119 return MathUtils.linearAnimation(0, 1, startAngle, targetAngle, progress);
@@ -111,7 +121,10 @@ QtObject {
111 return 0;
121 return 0;
124+ if (itemIndex == nextInStack || (stage == nextStage && (isMainStageApp || isSideStageApp))) {
114− return MathUtils.linearAnimation(0, 1, startAngle, targetAngle, progress);
125+ return MathUtils.linearAnimation(0, 1, startAngle, targetAngle, progress);
127+ return MathUtils.linearAnimation(breakPoint, 1, startAngle, targetAngle, progress);
117 readonly property real animatedScale: {
130 readonly property real animatedScale: {