diff --git a/components/mobileshell/qml/widgets/krunner/KRunnerWidget.qml b/components/mobileshell/qml/widgets/krunner/KRunnerWidget.qml index 727472b8..9f9d4309 100644 --- a/components/mobileshell/qml/widgets/krunner/KRunnerWidget.qml +++ b/components/mobileshell/qml/widgets/krunner/KRunnerWidget.qml @@ -79,6 +79,12 @@ Item { } } + Keys.onPressed: event => { + if (event.key === Qt.Key_Down) { + listView.forceActiveFocus(); + } + } + Flickable { id: flickable @@ -186,16 +192,24 @@ Item { } Layout.fillWidth: true - Layout.fillHeight: true + Layout.fillHeight: listView.contentHeight > availableHeight Milou.ResultsListView { id: listView queryString: queryField.text - highlight: null clip: true PlasmaCore.ColorScope.colorGroup: PlasmaCore.Theme.NormalColorGroup - onActivated: queryField.text = ""; + highlight: activeFocus ? highlightComponent : null + Component{ + id: highlightComponent + + PlasmaExtras.Highlight {} + } + + onActivated: { + root.close(); + } onUpdateQueryString: { queryField.text = text queryField.cursorPosition = cursorPosition @@ -214,6 +228,12 @@ Item { } hoverEnabled: true + function activateNextAction() { + queryField.forceActiveFocus(); + queryField.selectAll(); + listView.currentIndex = -1; + } + Rectangle { anchors.fill: parent color: delegate.pressed ? Qt.rgba(255, 255, 255, 0.2) : (delegate.containsMouse ? Qt.rgba(255, 255, 255, 0.05) : "transparent")