on xenial help sign in
Only allow searching when preview isn't open
ebb2d8bMichał Sawicz
qml/Dash/Dash.qml+1
@@ -27,6 +27,7 @@ Showable {
27 visible: shown
27 visible: shown
28
28
29 property ListModel searchHistory: SearchHistoryModel {}
29 property ListModel searchHistory: SearchHistoryModel {}
30+ property bool searchable: !dashContent.previewOpen
30
31
31 property string showScopeOnLoaded: "home.scope"
32 property string showScopeOnLoaded: "home.scope"
32 property real contentScale: 1.0
33 property real contentScale: 1.0
qml/Dash/DashContent.qml+1
@@ -25,6 +25,7 @@ Item {
25 property var model: null
25 property var model: null
26 property var scopes: null
26 property var scopes: null
27 property alias currentIndex: dashContentList.currentIndex
27 property alias currentIndex: dashContentList.currentIndex
28+ property alias previewOpen: previewListView.open
28
29
29 property ScopeDelegateMapper scopeMapper : ScopeDelegateMapper {}
30 property ScopeDelegateMapper scopeMapper : ScopeDelegateMapper {}
30 property ListModel searchHistory
31 property ListModel searchHistory
qml/Shell.qml+1−1
@@ -594,7 +594,7 @@ FocusScope {
594 contentEnabled: edgeDemo.panelContentEnabled
594 contentEnabled: edgeDemo.panelContentEnabled
595 }
595 }
596 fullscreenMode: shell.fullscreenMode
596 fullscreenMode: shell.fullscreenMode
597− searchVisible: !greeter.shown && !lockscreen.shown && dash.shown
597+ searchVisible: !greeter.shown && !lockscreen.shown && dash.shown && dash.searchable
598
598
599 InputFilterArea {
599 InputFilterArea {
600 anchors {
600 anchors {
tests/qmltests/tst_Shell.qml+16
@@ -110,6 +110,9 @@ Item {
110 swipeUntilScopeViewIsReached(dashHome);
110 swipeUntilScopeViewIsReached(dashHome);
111
111
112 hideIndicators();
112 hideIndicators();
113+
114+ var dashContent = findChild(shell, "dashContent");
115+ dashContent.previewOpen = true;
113 }
116 }
114
117
115 function killApps(apps) {
118 function killApps(apps) {
@@ -549,5 +552,18 @@ Item {
549 tryCompare(greeter, "shown", true)
552 tryCompare(greeter, "shown", true)
550 tryCompare(searchIndicator, "opacity", 0)
553 tryCompare(searchIndicator, "opacity", 0)
551 }
554 }
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+ }
552 }
568 }
553}
569}