18 import Ubuntu.Components 0.1
21 import
"../Components"
29 property string showScopeOnLoaded:
"clickscope"
30 property real contentScale: 1.0
32 function setCurrentScope(scopeId, animate, reset) {
33 var scopeIndex = filteredScopes.findFirst(Scopes.RoleId, scopeId)
35 if (scopeIndex == -1) {
36 console.warn(
"No match for scope with id: %1".arg(scopeId))
42 dashContent.closePreview();
44 if (scopeIndex == dashContent.currentIndex && !reset) {
49 dashContent.setCurrentScopeAtIndex(scopeIndex, animate, reset)
52 function closeOverlayScope() {
53 if (dashContent.x != 0) {
58 SortFilterProxyModel {
63 dynamicSortFilter:
true
65 filterRole: Scopes.RoleVisible
66 filterRegExp: RegExp(
"^true$")
71 objectName:
"dashContent"
78 dash.setCurrentScope(scopeId,
true,
false);
81 scopeItem.scope = scope;
85 if (scopeId == dash.showScopeOnLoaded) {
86 dash.setCurrentScope(scopeId,
false,
false)
87 dash.showScopeOnLoaded =
""
90 scale: dash.contentScale
91 clip: scale != 1.0 || scopeItem.visible
93 UbuntuNumberAnimation {
95 if (!running && dashContent.x == 0) {
96 dashContent.closeScope(scopeItem.scope);
97 scopeItem.scope = null;
106 anchors.left: dashContent.right
108 height: parent.height
109 scale: dash.contentScale
111 visible: scope != null
120 target: scopeItem.scope
122 dashContent.gotoScope(scopeId);
125 dashContent.openScope(scope);