on xenial help sign in
clicking on scope opens it
82b74fcAlbert Astals
qml/Dash/Dash.qml+21−5
@@ -96,8 +96,6 @@ Showable {
96 DashContent {
96 DashContent {
97 id: dashContent
97 id: dashContent
98
98
99− property var scopeThatOpenedScope: null
100−
101 objectName: "dashContent"
99 objectName: "dashContent"
102 width: dash.width
100 width: dash.width
103 height: dash.height
101 height: dash.height
@@ -107,7 +105,7 @@ Showable {
107 dash.setCurrentScope(scopeId, true, false);
105 dash.setCurrentScope(scopeId, true, false);
108 }
106 }
109 onOpenScope: {
107 onOpenScope: {
110− scopeThatOpenedScope = currentScope;
108+ scopeItem.scopeThatOpenedScope = currentScope;
111 scopeItem.scope = scope;
109 scopeItem.scope = scope;
112 x = -width;
110 x = -width;
113 }
111 }
@@ -124,7 +122,7 @@ Showable {
124 duration: bottomEdgeController.progress != 0 ? 0 : UbuntuAnimation.FastDuration
122 duration: bottomEdgeController.progress != 0 ? 0 : UbuntuAnimation.FastDuration
125 onRunningChanged: {
123 onRunningChanged: {
126 if (!running && dashContent.x == 0) {
124 if (!running && dashContent.x == 0) {
127− dashContent.scopeThatOpenedScope.closeScope(scopeItem.scope);
125+ scopeItem.scopeThatOpenedScope.closeScope(scopeItem.scope);
128 scopeItem.scope = null;
126 scopeItem.scope = null;
129 }
127 }
130 }
128 }
@@ -169,6 +167,22 @@ Showable {
169 property: "isActive"
167 property: "isActive"
170 value: bottomEdgeController.progress === 1
168 value: bottomEdgeController.progress === 1
171 }
169 }
170+
171+ Connections {
172+ target: scopesList.scope
173+ onOpenScope: {
174+ bottomEdgeController.enableAnimation = true;
175+ bottomEdgeController.progress = 0;
176+ scopeItem.scopeThatOpenedScope = scopesList.scope;
177+ scopeItem.scope = scope;
178+ dashContent.x = -dashContent.width;
179+ }
180+ onGotoScope: {
181+ bottomEdgeController.enableAnimation = true;
182+ bottomEdgeController.progress = 0;
183+ dashContent.gotoScope(scopeId);
184+ }
185+ }
172 }
186 }
173
187
174 DashBackground
188 DashBackground
@@ -184,6 +198,8 @@ Showable {
184 id: scopeItem
198 id: scopeItem
185 objectName: "dashTempScopeItem"
199 objectName: "dashTempScopeItem"
186
200
201+ property var scopeThatOpenedScope: null
202+
187 x: dashContent.x + width
203 x: dashContent.x + width
188 y: dashContent.y
204 y: dashContent.y
189 width: parent.width
205 width: parent.width
@@ -295,7 +311,7 @@ Showable {
295 enabled: !dashContent.subPageShown &&
311 enabled: !dashContent.subPageShown &&
296 dashContent.currentScope &&
312 dashContent.currentScope &&
297 dashContent.currentScope.searchQuery == "" &&
313 dashContent.currentScope.searchQuery == "" &&
298− !scopeItem.subPageShown &&
314+ !scopeItem.scope &&
299 (bottomEdgeController.progress == 0 || dragging)
315 (bottomEdgeController.progress == 0 || dragging)
300
316
301 readonly property real fullMovement: dash.height
317 readonly property real fullMovement: dash.height
qml/Dash/ScopesList.qml+6−9
@@ -101,20 +101,17 @@ Item {
101 model: scope ? scope.categories : null
101 model: scope ? scope.categories : null
102
102
103 delegate: Loader {
103 delegate: Loader {
104− source: "ScopesListCategory.qml";
105 asynchronous: true
104 asynchronous: true
106 width: root.width
105 width: root.width
107− onLoaded: {
106+ sourceComponent: ScopesListCategory {
108− item.isFavoriteFeeds = index == 0;
109− item.scopeStyle = scopeStyle;
107+ scopeStyle: scopeStyle;
110− item.model = Qt.binding(function() { return results });
108+ model: results
111− item.editMode = Qt.binding(function() { return root.state == "edit" });
109+ editMode: root.state == "edit"
112− }
110+
113− Connections {
114− target: item
115 onRequestFavorite: root.requestFavorite(scopeId, favorite);
111 onRequestFavorite: root.requestFavorite(scopeId, favorite);
116 onRequestEditMode: root.state = "edit";
112 onRequestEditMode: root.state = "edit";
117 onRequestScopeMoveTo: root.requestFavoriteMoveTo(scopeId, index);
113 onRequestScopeMoveTo: root.requestFavoriteMoveTo(scopeId, index);
114+ onRequestActivate: root.scope.activate(result);
118 }
115 }
119 }
116 }
120 }
117 }
qml/Dash/ScopesListCategory.qml+4−3
@@ -24,14 +24,14 @@ Item {
24
24
25 property alias model: list.model
25 property alias model: list.model
26 property var scopeStyle
26 property var scopeStyle
27− property bool isFavoriteFeeds: false
28 property bool editMode: false
27 property bool editMode: false
29
28
30− visible: !editMode || isFavoriteFeeds
29+ visible: !editMode || categoryId == "favorites"
31
30
32 signal requestFavorite(string scopeId, bool favorite)
31 signal requestFavorite(string scopeId, bool favorite)
33 signal requestEditMode()
32 signal requestEditMode()
34 signal requestScopeMoveTo(string scopeId, int index)
33 signal requestScopeMoveTo(string scopeId, int index)
34+ signal requestActivate(var result)
35
35
36 implicitHeight: childrenRect.height
36 implicitHeight: childrenRect.height
37
37
@@ -76,8 +76,9 @@ Item {
76
76
77 icon: model.art || ""
77 icon: model.art || ""
78 text: model.title || ""
78 text: model.title || ""
79− showStar: model.scopeId != "clickscope"
79+ showStar: model.scopeId != "clickscope" && (categoryId == "favorites" || categoryId == "other")
80
80
81+ onClicked: root.requestActivate(result);
81 onRequestFavorite: root.requestFavorite(model.scopeId, favorite);
82 onRequestFavorite: root.requestFavorite(model.scopeId, favorite);
82 onPressAndHold: {
83 onPressAndHold: {
83 if (!editMode) {
84 if (!editMode) {