on xenial help sign in
Close the overlay scope when manually setting a new scope for the dash content
commit4283f67e397be82155679465748c10e927ed6a3e authorAlbert Astals <albert.astals@canonical.com> dateMon 24 Mar 2014, 12:26 (13 years ago) parentbe90e4f
2 files changed+9−1
qml/Dash/Dash.qml+7−1 tests/qmltests/Dash/tst_Dash.qml+2
qml/Dash/Dash.qml+7−1
@@ -40,6 +40,8 @@ Showable {
4040 return
4141 }
4242
43+ closeOverlayScope();
44+
4345 dashContent.closePreview();
4446
4547 if (scopeIndex == dashContent.currentIndex && !reset) {
@@ -50,6 +52,10 @@ Showable {
5052 dashContent.setCurrentScopeAtIndex(scopeIndex, animate, reset)
5153 }
5254
55+ function closeOverlayScope() {
56+ dashContent.x = 0;
57+ }
58+
5359 SortFilterProxyModel {
5460 id: filteredScopes
5561 model: Scopes {
@@ -107,7 +113,7 @@ Showable {
107113 clip: scale != 1.0
108114 visible: scope != null
109115 onBack: {
110− dashContent.x = 0;
116+ closeOverlayScope();
111117 }
112118 onGotoScope: {
113119 // TODO
tests/qmltests/Dash/tst_Dash.qml+2
@@ -20,6 +20,8 @@ import "../../../qml/Dash"
2020import Ubuntu.Components 0.1
2121import Unity.Test 0.1 as UT
2222
23+// TODO We don't have any tests for the overlay scope functionality.
24+
2325Item {
2426 id: shell
2527 width: units.gu(40)