From 586819755b4dbfdffdc8a725ab7c0f86095b8489 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 15 Sep 2018 17:37:09 +0100 Subject: gentoo resync : 15.09.2018 --- .../plasma-desktop-5.13.5-kickersearch-nav.patch | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 kde-plasma/plasma-desktop/files/plasma-desktop-5.13.5-kickersearch-nav.patch (limited to 'kde-plasma/plasma-desktop/files') diff --git a/kde-plasma/plasma-desktop/files/plasma-desktop-5.13.5-kickersearch-nav.patch b/kde-plasma/plasma-desktop/files/plasma-desktop-5.13.5-kickersearch-nav.patch new file mode 100644 index 000000000000..75b5bc27b2ae --- /dev/null +++ b/kde-plasma/plasma-desktop/files/plasma-desktop-5.13.5-kickersearch-nav.patch @@ -0,0 +1,87 @@ +From 1692ae244bc5229df78df2d5ba2e76418362cb50 Mon Sep 17 00:00:00 2001 +From: Eike Hein +Date: Wed, 5 Sep 2018 18:58:35 +0900 +Subject: Improve arrow key navigation of Kicker search results + +Summary: +Kicker already makes sure the first search result is highlighted +and actionable while searching. This patch makes arrow-down after +typing move to the second search result instead of merely moving +focus from the search field to the list, so the user doesn't have +to press arrow-down twice anymore. + +It also allows using arrow-left/right to jump to the other result +columns, when the cursor is at the start or end of the text field, +respectively. + +BUG:397779 + +Reviewers: ngraham + +Subscribers: plasma-devel + +Tags: #plasma + +Differential Revision: https://phabricator.kde.org/D15286 +--- + .../package/contents/ui/MenuRepresentation.qml | 20 +++++++++++++++++++- + .../kicker/package/contents/ui/RunnerResultsList.qml | 1 + + 2 files changed, 20 insertions(+), 1 deletion(-) + +diff --git a/applets/kicker/package/contents/ui/MenuRepresentation.qml b/applets/kicker/package/contents/ui/MenuRepresentation.qml +index b70b76b..58cbf8d 100644 +--- a/applets/kicker/package/contents/ui/MenuRepresentation.qml ++++ b/applets/kicker/package/contents/ui/MenuRepresentation.qml +@@ -393,7 +393,7 @@ FocusScope { + } else if (event.key == Qt.Key_Down) { + if (rootList.visible) { + rootList.showChildDialogs = false; +- rootList.currentIndex = 0; ++ rootList.currentIndex = Math.min(1, rootList.count); + rootList.forceActiveFocus(); + rootList.showChildDialogs = true; + } +@@ -402,11 +402,29 @@ FocusScope { + for (var i = 0; i < runnerModel.count; ++i) { + if (runnerModel.modelForRow(i).count) { + var targetList = runnerColumnsRepeater.itemAt(i); ++ targetList.currentIndex = Math.min(1, targetList.count); ++ targetList.forceActiveFocus(); ++ break; ++ } ++ } ++ } ++ } else if (event.key == Qt.Key_Left && cursorPosition == 0) { ++ for (var i = runnerModel.count; i >= 0; --i) { ++ if (runnerModel.modelForRow(i).count) { ++ var targetList = runnerColumnsRepeater.itemAt(i); + targetList.currentIndex = 0; + targetList.forceActiveFocus(); + break; + } + } ++ } else if (event.key == Qt.Key_Right && cursorPosition == length) { ++ for (var i = 1; i < runnerModel.count; ++i) { ++ if (runnerModel.modelForRow(i).count) { ++ var targetList = runnerColumnsRepeater.itemAt(i); ++ targetList.currentIndex = 0; ++ targetList.forceActiveFocus(); ++ break; ++ } + } + } else if (event.key == Qt.Key_Enter || event.key == Qt.Key_Return) { + if (runnerColumns.visible && runnerModel.modelForRow(0).count) { +diff --git a/applets/kicker/package/contents/ui/RunnerResultsList.qml b/applets/kicker/package/contents/ui/RunnerResultsList.qml +index 3627c2f..4e6dc2f 100644 +--- a/applets/kicker/package/contents/ui/RunnerResultsList.qml ++++ b/applets/kicker/package/contents/ui/RunnerResultsList.qml +@@ -30,6 +30,7 @@ FocusScope { + signal keyNavigationAtListEnd + + property alias currentIndex: runnerMatches.currentIndex ++ property alias count: runnerMatches.count + property alias containsMouse: runnerMatches.containsMouse + + Accessible.name: header.text +-- +cgit v0.11.2 -- cgit v1.2.3