@@ -85,13 +85,12 @@ Showable {
88− // TODO showing Dash Overview from temp scope
89 ScopesOverview {
88 ScopesOverview {
90 id: scopesOverview
89 id: scopesOverview
91 anchors.fill: parent
90 anchors.fill: parent
92 scope: scopes ? scopes.getScope("scopesOverview") : null
91 scope: scopes ? scopes.getScope("scopesOverview") : null
93 progress: overviewController.progress
92 progress: overviewController.progress
94− scopeScale: 1 - overviewController.progress * 0.6
93+ scopeScale: scopeItem.scope ? 0.4 : (1 - overviewController.progress * 0.6)
95 visible: scopeScale != 1
94 visible: scopeScale != 1
96 currentIndex: dashContent.currentIndex
95 currentIndex: dashContent.currentIndex
@@ -101,7 +100,7 @@ Showable {
103 onFavoriteSelected: {
102 onFavoriteSelected: {
104− dashContent.setCurrentScopeAtIndex(index, false, false);
103+ setCurrentScope(scopeId, false, false);
107 onAllFavoriteSelected: {
106 onAllFavoriteSelected: {
@@ -128,10 +127,18 @@ Showable {
128 overviewController.enableAnimation = true;
127 overviewController.enableAnimation = true;
129 overviewController.progress = 0;
128 overviewController.progress = 0;
130+ onProgressChanged: {
131+ if (progress == 0) {
132+ currentTab = scopeItem.scope ? 1 : 0;
133 DashContent {
137 DashContent {
134 id: dashContent
138 id: dashContent
140+ property var scopeThatOpenedScope: null
135 parent: overviewController.progress == 0 ? dash : scopesOverview.dashItemEater
142 parent: overviewController.progress == 0 ? dash : scopesOverview.dashItemEater
136 objectName: "dashContent"
143 objectName: "dashContent"
137 width: dash.width
144 width: dash.width
@@ -143,7 +150,9 @@ Showable {
143 dash.setCurrentScope(scopeId, true, false);
150 dash.setCurrentScope(scopeId, true, false);
145 onOpenScope: {
152 onOpenScope: {
153+ scopeThatOpenedScope = currentScope;
146 scopeItem.scope = scope;
154 scopeItem.scope = scope;
155+ scopesOverview.currentTab = 1;
147 x = -width;
156 x = -width;
149 onScopeLoaded: {
158 onScopeLoaded: {
@@ -156,10 +165,15 @@ Showable {
156 clip: scale != 1.0 || scopeItem.visible || overviewController.progress != 0
165 clip: scale != 1.0 || scopeItem.visible || overviewController.progress != 0
157 Behavior on x {
166 Behavior on x {
158 UbuntuNumberAnimation {
167 UbuntuNumberAnimation {
168+ duration: overviewController.progress != 0 ? 0 : UbuntuAnimation.FastDuration
159 onRunningChanged: {
169 onRunningChanged: {
160 if (!running && dashContent.x == 0) {
170 if (!running && dashContent.x == 0) {
161− dashContent.closeScope(scopeItem.scope);
171+ dashContent.scopeThatOpenedScope.closeScope(scopeItem.scope);
162 scopeItem.scope = null;
172 scopeItem.scope = null;
173+ if (overviewController.progress == 0) {
174+ // Set tab to Favorites only if we are not showing the overview
175+ scopesOverview.currentTab = 0;
@@ -174,15 +188,36 @@ Showable {
174 anchors.fill: scopeItem
188 anchors.fill: scopeItem
175 visible: scopeItem.visible
189 visible: scopeItem.visible
176 parent: scopeItem.parent
190 parent: scopeItem.parent
191+ scale: scopeItem.scale
192+ opacity: scopeItem.opacity
179 GenericScopeView {
195 GenericScopeView {
180 id: scopeItem
196 id: scopeItem
182− anchors.left: dashContent.right
198+ readonly property real targetOverviewScale: {
199+ if (scopesOverview.currentTab == 0) {
202+ return scopesOverview.allCardSize.width / scopeItem.width;
205+ readonly property real overviewProgressScale: (1 - overviewController.progress * (1 - targetOverviewScale))
206+ readonly property var targetOverviewPosition: scope ? scopesOverview.allScopeCardPosition(scope.id) : null
207+ readonly property real overviewProgressX: scope && scopesOverview.currentTab == 1 && targetOverviewPosition ?
208+ overviewController.progress * (targetOverviewPosition.x - (width - scopesOverview.allCardSize.width) / 2)
210+ readonly property real overviewProgressY: scope && scopesOverview.currentTab == 1 && targetOverviewPosition ?
211+ overviewController.progress * (targetOverviewPosition.y - (height - scopesOverview.allCardSize.height) / 2)
214+ x: overviewController.progress == 0 ? dashContent.x + width : overviewProgressX
215+ y: overviewController.progress == 0 ? dashContent.y : overviewProgressY
183 width: parent.width
216 width: parent.width
184 height: parent.height
217 height: parent.height
185− scale: dash.contentScale
218+ scale: dash.contentScale * overviewProgressScale
219+ enabled: opacity == 1
220+ opacity: 1 - overviewController.progress
186 clip: scale != 1.0
221 clip: scale != 1.0
187 visible: scope != null
222 visible: scope != null
188 hasBackAction: true
223 hasBackAction: true