@@ -15,6 +15,12 @@ FocusScope {
1515 property bool draggingHorizontally: false
1616 property int dragDistance: 0
1717
18+ onFocusChanged: {
19+ if (focus) {
20+ searchField.selectAll();
21+ }
22+ }
23+
1824 Rectangle {
1925 anchors.fill: parent
2026 color: "#BF000000"
@@ -40,6 +46,11 @@ FocusScope {
4046 anchors { left: parent.left; top: parent.top; right: parent.right; margins: units.gu(1) }
4147 placeholderText: i18n.tr("Search...")
4248 focus: true
49+ onAccepted: {
50+ if (searchField.displayText != "" && listLoader.item && listLoader.item.currentItem) {
51+ root.applicationSelected(listLoader.item.currentItem.appId);
52+ }
53+ }
4354 }
4455
4556 Item {
@@ -167,6 +178,8 @@ FocusScope {
167178 // which messes up the ListView.
168179 height: (Math.ceil(mostUsedGridView.model.count / mostUsedGridView.columns) * mostUsedGridView.delegateHeight) + units.gu(2)
169180
181+ readonly property string appId: model.appId
182+
170183 DrawerGridView {
171184 id: mostUsedGridView
172185 anchors.fill: parent
@@ -209,6 +222,8 @@ FocusScope {
209222 color: "#20ffffff"
210223 aspect: UbuntuShape.Flat
211224
225+ readonly property string appId: model.appId
226+
212227 // NOTE: Cannot use gridView.rows here as it would evaluate to 0 at first and only update later,
213228 // which messes up the ListView.
214229 height: (Math.ceil(gridView.model.count / gridView.columns) * gridView.delegateHeight) +