on xenial help sign in
Support previews for scopes in overview and hook up preview processing signal to activity indicator.
a4e9eadMichał Sawicz
qml/Dash/ScopesOverview.qml+11−4
@@ -32,7 +32,7 @@ Item {
32 property alias currentTab: tabBar.currentTab
32 property alias currentTab: tabBar.currentTab
33
33
34 // Properties used by parent
34 // Properties used by parent
35− readonly property bool processing: searchResultsViewer.processing || tempScopeItem.processing
35+ readonly property bool processing: searchResultsViewer.processing || tempScopeItem.processing || previewListView.processing
36 property bool growingDashFromPos: false
36 property bool growingDashFromPos: false
37 readonly property bool searching: scope && scope.searchQuery == ""
37 readonly property bool searching: scope && scope.searchQuery == ""
38 readonly property bool showingNonFavoriteScope: tempScopeItem.scope != null
38 readonly property bool showingNonFavoriteScope: tempScopeItem.scope != null
@@ -366,7 +366,16 @@ Item {
366 }
366 }
367
367
368 function itemPressedAndHeld(index, itemModel, resultsModel, limitedCategoryItemCount) {
368 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+ }
370 }
379 }
371 }
380 }
372
381
@@ -455,8 +464,6 @@ Item {
455 anchors.left: scopesOverviewContent.right
464 anchors.left: scopesOverviewContent.right
456 }
465 }
457
466
458−
459−
460 Item {
467 Item {
461 id: scopesOverviewXYScaler
468 id: scopesOverviewXYScaler
462 width: parent.width
469 width: parent.width