@@ -27,6 +27,7 @@ FocusScope {
27 id: sortProxyModel
27 id: sortProxyModel
28 source: appDrawerModel
28 source: appDrawerModel
29 filterString: searchField.text
29 filterString: searchField.text
30+ sortBy: AppDrawerProxyModel.SortByAToZ
@@ -57,6 +58,9 @@ FocusScope {
59 text: i18n.ctr("Most used apps", "Most used")
60 text: i18n.ctr("Most used apps", "Most used")
@@ -72,7 +76,13 @@ FocusScope {
73 id: listLoader
77 id: listLoader
74 anchors { left: parent.left; top: sectionsContainer.bottom; right: parent.right; bottom: parent.bottom; leftMargin: units.gu(1); rightMargin: units.gu(1) }
78 anchors { left: parent.left; top: sectionsContainer.bottom; right: parent.right; bottom: parent.bottom; leftMargin: units.gu(1); rightMargin: units.gu(1) }
75− sourceComponent: sections.selectedIndex == 0 ? aToZComponent : mostUsedComponent
80+ switch (sections.selectedIndex) {
81+ case 0: return aToZComponent;
82+ case 1: return mostUsedComponent;
83+ default: return debugComponent;
78 MouseArea {
88 MouseArea {
@@ -108,6 +118,27 @@ FocusScope {
124+ anchors.fill: parent
125+ topMargin: units.gu(1)
126+ bottomMargin: units.gu(1)
127+ spacing: units.gu(1)
130+ model: sortProxyModel
131+// model: AppDrawerProxyModel {
132+// source: sortProxyModel
133+// group: AppDrawerProxyModel.GroupByAToZ
134+// sortBy: AppDrawerProxyModel.SortByAToZ
137+ text: model.letter + " - " + model.name
111 Component {
142 Component {
112 id: mostUsedComponent
143 id: mostUsedComponent
113 ListView {
144 ListView {
@@ -135,7 +166,6 @@ FocusScope {
135 // NOTE: Cannot use gridView.rows here as it would evaluate to 0 at first and only update later,
166 // NOTE: Cannot use gridView.rows here as it would evaluate to 0 at first and only update later,
136 // which messes up the ListView.
167 // which messes up the ListView.
137 height: (Math.ceil(mostUsedGridView.model.count / mostUsedGridView.columns) * mostUsedGridView.delegateHeight) + units.gu(2)
168 height: (Math.ceil(mostUsedGridView.model.count / mostUsedGridView.columns) * mostUsedGridView.delegateHeight) + units.gu(2)
138− enabled: parent.interactive
140 DrawerGridView {
170 DrawerGridView {
141 id: mostUsedGridView
171 id: mostUsedGridView
@@ -170,6 +200,7 @@ FocusScope {
171 model: AppDrawerProxyModel {
201 model: AppDrawerProxyModel {
172 source: sortProxyModel
202 source: sortProxyModel
203+ sortBy: AppDrawerProxyModel.SortByAToZ
173 group: AppDrawerProxyModel.GroupByAToZ
204 group: AppDrawerProxyModel.GroupByAToZ
@@ -177,7 +208,6 @@ FocusScope {
177 width: parent.width
208 width: parent.width
178 color: "#20ffffff"
209 color: "#20ffffff"
179 aspect: UbuntuShape.Flat
210 aspect: UbuntuShape.Flat
180− enabled: parent.interactive
182 // NOTE: Cannot use gridView.rows here as it would evaluate to 0 at first and only update later,
212 // NOTE: Cannot use gridView.rows here as it would evaluate to 0 at first and only update later,
183 // which messes up the ListView.
213 // which messes up the ListView.