on xenial help sign in
selecting a favorite "works"

animation is horrible :D

commitcdbcecea5579930c5a3318aea1623da94e222945 authorAlbert Astals <albert.astals@canonical.com> dateFri 11 Jul 2014, 12:46 (12 years ago) parent053eaec
2 files changed+19−3
qml/Dash/DashContent.qml+7−2 qml/Dash/ScopesOverview.qml+12−1
qml/Dash/DashContent.qml+7−2
@@ -98,12 +98,17 @@ Item {
9898 anchors.fill: parent
9999 scope: scopes ? scopes.getScope("scopesOverview") : null
100100 progress: overviewController.progress
101− onDone: {
101+ scopeScale: dashContentListHolder.scale
102+ onDone: hide();
103+ onFavoriteSelected: {
104+ dashContentList.currentIndex = index;
105+ hide();
106+ }
107+ function hide() {
102108 overviewController.enableAnimation = true;
103109 overviewController.progress = 0;
104110 overviewController.accepted = false;
105111 }
106− scopeScale: dashContentListHolder.scale
107112 }
108113
109114 Item {
qml/Dash/ScopesOverview.qml+12−1
@@ -25,7 +25,9 @@ Item {
2525 property var scope: null
2626 property real scopeScale: 1
2727
28− signal done
28+ signal done()
29+ signal favoriteSelected(int index)
30+ signal allSelected(var scope)
2931
3032 Image {
3133 anchors.fill: parent
@@ -136,6 +138,8 @@ Item {
136138 id: middleItems
137139 model: scope ? scope.categories : null
138140 delegate: Loader {
141+ id: loader
142+
139143 height: {
140144 if (index == 0) {
141145 return parent.height;
@@ -197,6 +201,13 @@ Item {
197201 item.extraHeight = bottomBar.height;
198202 }
199203 }
204+
205+ Connections {
206+ target: loader.item
207+ onClicked: {
208+ if (tabBarHolder.currentTab == 0) root.favoriteSelected(index)
209+ }
210+ }
200211 }
201212 }
202213