@@ -111,9 +111,13 @@ Showable {
111 target: scopesOverview.scope
111 target: scopesOverview.scope
112 onOpenScope: {
112 onOpenScope: {
113 scopeItem.scope = scope;
113 scopeItem.scope = scope;
114− scopeItem.overviewScale = 0.4;
114+ scopeItem.overviewScale = scopesOverview.allCardSize.width / scopeItem.width;
115+ scopeItem.x = scopesOverview.allScopeClickedPos.x -(scopeItem.width - scopeItem.width * scopeItem.overviewScale) / 2;
116+ scopeItem.y = scopesOverview.allScopeClickedPos.y -(scopeItem.height - scopeItem.height * scopeItem.overviewScale) / 2;
115 overviewController.showingNonFavoriteScope = true;
117 overviewController.showingNonFavoriteScope = true;
116 scopeItem.overviewScale = 1;
118 scopeItem.overviewScale = 1;
@@ -161,6 +165,7 @@ Showable {
162 anchors.fill: scopeItem
166 anchors.fill: scopeItem
163 scale: scopeItem.scale
167 scale: scopeItem.scale
168+ visible: scopeItem.visible
166 GenericScopeView {
171 GenericScopeView {
@@ -168,15 +173,25 @@ Showable {
169 property real overviewScale: 1
174 property real overviewScale: 1
176+ // TODO test this width + dashContent.x still works
171 x: overviewController.showingNonFavoriteScope ? 0 : width + dashContent.x
177 x: overviewController.showingNonFavoriteScope ? 0 : width + dashContent.x
179+ enabled: overviewController.showingNonFavoriteScope
180+ UbuntuNumberAnimation { }
183+ enabled: overviewController.showingNonFavoriteScope
184+ UbuntuNumberAnimation { }
172 width: parent.width
186 width: parent.width
173 height: parent.height
187 height: parent.height
174 scale: dash.contentScale * overviewScale
188 scale: dash.contentScale * overviewScale
175 Behavior on overviewScale {
190 Behavior on overviewScale {
176 enabled: overviewController.showingNonFavoriteScope
191 enabled: overviewController.showingNonFavoriteScope
177 UbuntuNumberAnimation {
192 UbuntuNumberAnimation {
178 onRunningChanged: {
193 onRunningChanged: {
179− if (!running && scopeItem.overviewScale == 0.4) {
194+ if (!running && scopeItem.overviewScale != 1) {
180 scopesOverview.scope.closeScope(scopeItem.scope);
195 scopesOverview.scope.closeScope(scopeItem.scope);
181 overviewController.showingNonFavoriteScope = false;
196 overviewController.showingNonFavoriteScope = false;
182 scopeItem.scope = null;
197 scopeItem.scope = null;
@@ -190,7 +205,10 @@ Showable {
190 isCurrent: visible
205 isCurrent: visible
191 onBackClicked: {
206 onBackClicked: {
192 if (overviewController.showingNonFavoriteScope) {
207 if (overviewController.showingNonFavoriteScope) {
208+ var v = scopesOverview.allCardSize.width / scopeItem.width;
193− scopeItem.overviewScale = 0.4;
209+ scopeItem.overviewScale = v;
210+ scopeItem.x = scopesOverview.allScopeClickedPos.x -(scopeItem.width - scopeItem.width * v) / 2;
211+ scopeItem.y = scopesOverview.allScopeClickedPos.y -(scopeItem.height - scopeItem.height * v) / 2;
195 closeOverlayScope();
213 closeOverlayScope();
196 closePreview();
214 closePreview();
@@ -213,6 +231,7 @@ Showable {
214 direction: Direction.Upwards
232 direction: Direction.Upwards
215 distanceThreshold: units.gu(20)
233 distanceThreshold: units.gu(20)
234+ // TODO this needs to be disabled in a few more cases
216 enabled: !overviewController.accepted || dragging
235 enabled: !overviewController.accepted || dragging
218 anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
237 anchors { left: parent.left; right: parent.right; bottom: parent.bottom }