@@ -23,6 +23,7 @@ Item {
2323
2424 property real progress: 0
2525 property var scope: null
26+ property real scopeScale: 1
2627
2728 signal done
2829
@@ -135,6 +136,48 @@ Item {
135136 id: middleItems
136137 model: scope ? scope.categories : null
137138 delegate: Loader {
139+ height: {
140+ if (index == 0) {
141+ return parent.height;
142+ } else {
143+ return parent.height - topBar.height - units.gu(2)
144+ }
145+ }
146+ width: {
147+ if (index == 0) {
148+ return parent.width / scopeScale
149+ } else {
150+ return parent.width
151+ }
152+ }
153+ x: {
154+ if (index == 0) {
155+ return (root.width - width) / 2;
156+ } else {
157+ return 0;
158+ }
159+ }
160+ anchors {
161+ bottom: parent.bottom
162+ }
163+
164+ scale: index == 0 ? scopeScale : 1
165+
166+ opacity: tabBarHolder.currentTab == index ? 1 : 0
167+ Behavior on opacity { UbuntuNumberAnimation { } }
168+ enabled: opacity == 1
169+
170+ clip: index == 1
171+
172+ CardTool {
173+ id: cardTool
174+ objectName: "cardTool"
175+ count: results.count
176+ template: model.renderer
177+ components: model.components
178+ viewWidth: parent.width
179+ }
180+
138181 source: {
139182 if (index == 0) return "ScopesOverviewFavourites.qml";
140183 else if (index == 1) return "ScopesOverviewAll.qml";
@@ -143,6 +186,17 @@ Item {
143186 return "";
144187 }
145188 }
189+
190+ onLoaded: {
191+ item.model = Qt.binding(function() { return results })
192+ item.cardTool = cardTool;
193+ if (index == 0) {
194+ item.scopeWidth = root.width;
195+ item.scopeHeight = root.height;
196+ } else if (index == 1) {
197+ item.extraHeight = bottomBar.height;
198+ }
199+ }
146200 }
147201 }
148202
@@ -151,6 +205,7 @@ Item {
151205 color: "black"
152206 height: units.gu(6)
153207 width: parent.width
208+ opacity: 0.4
154209 y: {
155210 if (root.progress < 0.5) {
156211 return parent.height;
@@ -180,7 +235,10 @@ Item {
180235 text: i18n.tr("Done")
181236 color: parent.pressed ? "black" : "white"
182237 }
183− onClicked: root.done()
238+ onClicked: {
239+ root.done();
240+ tabBarHolder.currentTab = 0;
241+ }
184242 }
185243 }
186244}