on xenial help sign in
Only allow searching when preview isn't open
commitebb2d8ba6f82b0f810a45e32b93e49daae0a84e3 authorMichał Sawicz <michal.sawicz@canonical.com> dateThu 6 Mar 2014, 11:44 (13 years ago) parent8851f0e
4 files changed+19−1
qml/Dash/Dash.qml+1 qml/Dash/DashContent.qml+1 qml/Shell.qml+1−1 tests/qmltests/tst_Shell.qml+16
qml/Dash/Dash.qml+1
@@ -27,6 +27,7 @@ Showable {
2727 visible: shown
2828
2929 property ListModel searchHistory: SearchHistoryModel {}
30+ property bool searchable: !dashContent.previewOpen
3031
3132 property string showScopeOnLoaded: "home.scope"
3233 property real contentScale: 1.0
qml/Dash/DashContent.qml+1
@@ -25,6 +25,7 @@ Item {
2525 property var model: null
2626 property var scopes: null
2727 property alias currentIndex: dashContentList.currentIndex
28+ property alias previewOpen: previewListView.open
2829
2930 property ScopeDelegateMapper scopeMapper : ScopeDelegateMapper {}
3031 property ListModel searchHistory
qml/Shell.qml+1−1
@@ -594,7 +594,7 @@ FocusScope {
594594 contentEnabled: edgeDemo.panelContentEnabled
595595 }
596596 fullscreenMode: shell.fullscreenMode
597− searchVisible: !greeter.shown && !lockscreen.shown && dash.shown
597+ searchVisible: !greeter.shown && !lockscreen.shown && dash.shown && dash.searchable
598598
599599 InputFilterArea {
600600 anchors {
tests/qmltests/tst_Shell.qml+16
@@ -110,6 +110,9 @@ Item {
110110 swipeUntilScopeViewIsReached(dashHome);
111111
112112 hideIndicators();
113+
114+ var dashContent = findChild(shell, "dashContent");
115+ dashContent.previewOpen = true;
113116 }
114117
115118 function killApps(apps) {
@@ -549,5 +552,18 @@ Item {
549552 tryCompare(greeter, "shown", true)
550553 tryCompare(searchIndicator, "opacity", 0)
551554 }
555+
556+ function test_searchIndicatorHideOnPreviewShown() {
557+ var searchIndicator = findChild(shell, "container");
558+ var dashContent = findChild(shell, "dashContent");
559+
560+ verify(dashContent != null);
561+
562+ tryCompare(searchIndicator, "opacity", 1);
563+
564+ dashContent.previewOpen = true;
565+
566+ tryCompare(searchIndicator, "opacity", 0);
567+ }
552568 }
553569}