on xenial help sign in
Close the overlay scope when manually setting a new scope for the dash content
4283f67Albert Astals
qml/Dash/Dash.qml+7−1
@@ -40,6 +40,8 @@ Showable {
40 return
40 return
41 }
41 }
42
42
43+ closeOverlayScope();
44+
43 dashContent.closePreview();
45 dashContent.closePreview();
44
46
45 if (scopeIndex == dashContent.currentIndex && !reset) {
47 if (scopeIndex == dashContent.currentIndex && !reset) {
@@ -50,6 +52,10 @@ Showable {
50 dashContent.setCurrentScopeAtIndex(scopeIndex, animate, reset)
52 dashContent.setCurrentScopeAtIndex(scopeIndex, animate, reset)
51 }
53 }
52
54
55+ function closeOverlayScope() {
56+ dashContent.x = 0;
57+ }
58+
53 SortFilterProxyModel {
59 SortFilterProxyModel {
54 id: filteredScopes
60 id: filteredScopes
55 model: Scopes {
61 model: Scopes {
@@ -107,7 +113,7 @@ Showable {
107 clip: scale != 1.0
113 clip: scale != 1.0
108 visible: scope != null
114 visible: scope != null
109 onBack: {
115 onBack: {
110− dashContent.x = 0;
116+ closeOverlayScope();
111 }
117 }
112 onGotoScope: {
118 onGotoScope: {
113 // TODO
119 // TODO
tests/qmltests/Dash/tst_Dash.qml+2
@@ -20,6 +20,8 @@ import "../../../qml/Dash"
20import Ubuntu.Components 0.1
20import Ubuntu.Components 0.1
21import Unity.Test 0.1 as UT
21import Unity.Test 0.1 as UT
22
22
23+// TODO We don't have any tests for the overlay scope functionality.
24+
23Item {
25Item {
24 id: shell
26 id: shell
25 width: units.gu(40)
27 width: units.gu(40)