on xenial help sign in
Removed previewShown and settingsShown properties
c6d555dAndrea Cimitan
qml/Dash/Dash.qml+1−2
@@ -341,8 +341,7 @@ Showable {
341 objectName: "overviewDragHandle"
341 objectName: "overviewDragHandle"
342 z: 1
342 z: 1
343 direction: Direction.Upwards
343 direction: Direction.Upwards
344− enabled: !dashContent.previewShown &&
344+ enabled: !dashContent.subPageShown &&
345− !dashContent.settingsShown &&
346 dashContent.currentScope &&
345 dashContent.currentScope &&
347 dashContent.currentScope.searchQuery == "" &&
346 dashContent.currentScope.searchQuery == "" &&
348 (overviewController.progress == 0 || dragging)
347 (overviewController.progress == 0 || dragging)
qml/Dash/DashContent.qml+4−6
@@ -27,10 +27,8 @@ Item {
27 readonly property alias currentIndex: dashContentList.currentIndex
27 readonly property alias currentIndex: dashContentList.currentIndex
28 readonly property string currentScopeId: dashContentList.currentItem ? dashContentList.currentItem.scopeId : ""
28 readonly property string currentScopeId: dashContentList.currentItem ? dashContentList.currentItem.scopeId : ""
29 readonly property var currentScope: dashContentList.currentItem ? dashContentList.currentItem.theScope : null
29 readonly property var currentScope: dashContentList.currentItem ? dashContentList.currentItem.theScope : null
30− readonly property bool previewShown: dashContentList.currentItem && dashContentList.currentItem.item ?
31− dashContentList.currentItem.item.previewShown : false
32− readonly property bool settingsShown: dashContentList.currentItem && dashContentList.currentItem.item ?
30+ readonly property bool subPageShown: dashContentList.currentItem && dashContentList.currentItem.item ?
33− dashContentList.currentItem.item.settingsShown : false
31+ dashContentList.currentItem.item.subPageShown : false
34 readonly property bool processing: dashContentList.currentItem && dashContentList.currentItem.item
32 readonly property bool processing: dashContentList.currentItem && dashContentList.currentItem.item
35 && dashContentList.currentItem.item.processing || false
33 && dashContentList.currentItem.item.processing || false
36 readonly property bool pageHeaderTotallyVisible: dashContentList.currentItem && dashContentList.currentItem.item
34 readonly property bool pageHeaderTotallyVisible: dashContentList.currentItem && dashContentList.currentItem.item
@@ -98,7 +96,7 @@ Item {
98 id: dashContentList
96 id: dashContentList
99 objectName: "dashContentList"
97 objectName: "dashContentList"
100
98
101− interactive: dashContent.scopes.loaded && currentItem && !currentItem.moving && !currentItem.navigationShown && !currentItem.settingsShown
99+ interactive: dashContent.scopes.loaded && currentItem && !currentItem.moving && !currentItem.navigationShown && !currentItem.subPageShown
102 anchors.fill: parent
100 anchors.fill: parent
103 orientation: ListView.Horizontal
101 orientation: ListView.Horizontal
104 boundsBehavior: Flickable.DragAndOvershootBounds
102 boundsBehavior: Flickable.DragAndOvershootBounds
@@ -138,7 +136,7 @@ Item {
138
136
139 readonly property bool moving: item ? item.moving : false
137 readonly property bool moving: item ? item.moving : false
140 readonly property bool navigationShown: item ? item.navigationShown : false
138 readonly property bool navigationShown: item ? item.navigationShown : false
141− readonly property bool settingsShown: item ? item.settingsShown : false
139+ readonly property bool subPageShown: item ? item.subPageShown : false
142 readonly property var categoryView: item ? item.categoryView : null
140 readonly property var categoryView: item ? item.categoryView : null
143 readonly property var theScope: scope
141 readonly property var theScope: scope
144
142
qml/Dash/GenericScopeView.qml+2−4
@@ -34,8 +34,7 @@ FocusScope {
34 property bool enableHeightBehaviorOnNextCreation: false
34 property bool enableHeightBehaviorOnNextCreation: false
35 property var categoryView: categoryView
35 property var categoryView: categoryView
36 property bool showPageHeader: true
36 property bool showPageHeader: true
37− readonly property alias previewShown: subPageLoader.previewShown
37+ readonly property alias subPageShown: subPageLoader.subPageShown
38− readonly property alias settingsShown: subPageLoader.settingsShown
39 property int paginationCount: 0
38 property int paginationCount: 0
40 property int paginationIndex: 0
39 property int paginationIndex: 0
41 property alias pageHeaderTotallyVisible: categoryView.pageHeaderTotallyVisible
40 property alias pageHeaderTotallyVisible: categoryView.pageHeaderTotallyVisible
@@ -471,8 +470,7 @@ FocusScope {
471 readonly property var currentItem: item && item.currentItem || null
470 readonly property var currentItem: item && item.currentItem || null
472
471
473 property string subPage: ""
472 property string subPage: ""
474− readonly property bool previewShown: visible && subPage == "preview"
473+ readonly property bool subPageShown: visible && status === Loader.Ready
475− readonly property bool settingsShown: visible && subPage == "settings"
476
474
477 function openSubPage(page) {
475 function openSubPage(page) {
478 subPage = page;
476 subPage = page;
tests/autopilot/unity8/shell/emulators/dash.py+1−1
@@ -186,7 +186,7 @@ class GenericScopeView(emulators.UnityEmulatorBase):
186 self.click_scope_item(category, app_name)
186 self.click_scope_item(category, app_name)
187 preview_list = self.wait_select_single(
187 preview_list = self.wait_select_single(
188 'QQuickLoader', objectName='subPageLoader')
188 'QQuickLoader', objectName='subPageLoader')
189− preview_list.previewShown.wait_for(True)
189+ preview_list.subPageShown.wait_for(True)
190 preview_list.x.wait_for(0)
190 preview_list.x.wait_for(0)
191 return preview_list.select_single(
191 return preview_list.select_single(
192 Preview, objectName='preview{}'.format(preview_list.currentIndex))
192 Preview, objectName='preview{}'.format(preview_list.currentIndex))
tests/qmltests/Dash/tst_GenericScopeView.qml+3−2
@@ -375,14 +375,15 @@ Item {
375 mouseClick(settings, settings.width / 2, settings.height / 2);
375 mouseClick(settings, settings.width / 2, settings.height / 2);
376 tryCompare(testCase.subPageLoader, "open", true);
376 tryCompare(testCase.subPageLoader, "open", true);
377 tryCompareFunction(function() { return ("" + subPageLoader.source).indexOf("ScopeSettingsPage.qml") != -1; }, true);
377 tryCompareFunction(function() { return ("" + subPageLoader.source).indexOf("ScopeSettingsPage.qml") != -1; }, true);
378− compare(genericScopeView.settingsShown, true)
378+ compare(genericScopeView.subPageShown, true);
379+ compare(genericScopeView.subPage, "settings");
379 tryCompare(testCase.subPageLoader, "x", 0);
380 tryCompare(testCase.subPageLoader, "x", 0);
380
381
381 // close
382 // close
382 var settingsHeader = findChild(testCase.subPageLoader.item, "pageHeader");
383 var settingsHeader = findChild(testCase.subPageLoader.item, "pageHeader");
383 mouseClick(settingsHeader, units.gu(2), units.gu(2));
384 mouseClick(settingsHeader, units.gu(2), units.gu(2));
384 tryCompare(testCase.subPageLoader, "open", false);
385 tryCompare(testCase.subPageLoader, "open", false);
385− tryCompare(genericScopeView, "settingsShown", false);
386+ tryCompare(genericScopeView, "subPageShown", false);
386 var categoryListView = findChild(genericScopeView, "categoryListView");
387 var categoryListView = findChild(genericScopeView, "categoryListView");
387 tryCompare(categoryListView, "x", 0);
388 tryCompare(categoryListView, "x", 0);
388 }
389 }