on xenial help sign in
Support previews for scopes in overview and hook up preview processing signal to activity indicator.
commita4e9ead84168a47c099d5182e2081fac0dba7023 authorMichał Sawicz <michal.sawicz@canonical.com> dateFri 15 Aug 2014, 00:18 (12 years ago) parent96d3964
1 file changed+11−4
qml/Dash/ScopesOverview.qml+11−4
qml/Dash/ScopesOverview.qml+11−4
@@ -32,7 +32,7 @@ Item {
3232 property alias currentTab: tabBar.currentTab
3333
3434 // Properties used by parent
35− readonly property bool processing: searchResultsViewer.processing || tempScopeItem.processing
35+ readonly property bool processing: searchResultsViewer.processing || tempScopeItem.processing || previewListView.processing
3636 property bool growingDashFromPos: false
3737 readonly property bool searching: scope && scope.searchQuery == ""
3838 readonly property bool showingNonFavoriteScope: tempScopeItem.scope != null
@@ -366,7 +366,16 @@ Item {
366366 }
367367
368368 function itemPressedAndHeld(index, itemModel, resultsModel, limitedCategoryItemCount) {
369− // Do nothing
369+ if (itemModel.uri.indexOf("scope://") === 0) {
370+ // Preview can call openScope so make sure restorePosition and restoreSize are set
371+ scopesOverviewXYScaler.restorePosition = undefined;
372+ scopesOverviewXYScaler.restoreSize = allCardSize;
373+
374+ previewListView.model = resultsModel;
375+ previewListView.currentIndex = -1;
376+ previewListView.currentIndex = index;
377+ previewListView.open = true;
378+ }
370379 }
371380 }
372381
@@ -455,8 +464,6 @@ Item {
455464 anchors.left: scopesOverviewContent.right
456465 }
457466
458−
459−
460467 Item {
461468 id: scopesOverviewXYScaler
462469 width: parent.width