summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-09-11 16:26:52 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2018-09-11 18:23:50 +0200
commit61c992359d353f5ccac8e997443991cbcb733e73 (patch)
tree507053da6689f95214c348161527e247d4e45cdd /kde-plasma/plasma-desktop/files
parentkde-apps/kitinerary: Add VIRTUALX_REQUIRED=test (diff)
downloadgentoo-61c992359d353f5ccac8e997443991cbcb733e73.tar.gz
gentoo-61c992359d353f5ccac8e997443991cbcb733e73.tar.bz2
gentoo-61c992359d353f5ccac8e997443991cbcb733e73.zip
kde-plasma/plasma-desktop: Improve arrow key nav. of kicker search
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=397779 See also: https://phabricator.kde.org/D15286 Package-Manager: Portage-2.3.48, Repoman-2.3.10
Diffstat (limited to 'kde-plasma/plasma-desktop/files')
-rw-r--r--kde-plasma/plasma-desktop/files/plasma-desktop-5.13.5-kickersearch-nav.patch87
1 files changed, 87 insertions, 0 deletions
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 <hein@kde.org>
+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