Commit 659fe0a7 authored by Nate Graham's avatar Nate Graham
Browse files

[Notifications KCM] Fix keyboard navigation in apps list

Learned how to do this from @guoyunhe in D24798!

BUG: 409024
FIXED-IN: 5.17.4

Test Plan:
1. Click on list item -> list gets focus, item is shown
2. Use up and down arrow keys -> items are shown
3. Click on search field and tab into list -> you can select things with the keyboard
4. Search for something and click on or tab into apps list -> the correct item is shown

Reviewers: broulik, #plasma

Subscribers: plasma-devel, guoyunhe

Tags: #plasma

Differential Revision:
parent e48e22b0
......@@ -87,7 +87,6 @@ Kirigami.Page {
id: sourcesScroll
Layout.fillWidth: true
Layout.fillHeight: true
activeFocusOnTab: false
Kirigami.Theme.colorSet: Kirigami.Theme.View
Kirigami.Theme.inherit: false
......@@ -96,6 +95,7 @@ Kirigami.Page {
ListView {
id: sourcesList
clip: true
focus: true
activeFocusOnTab: true
keyNavigationEnabled: true
......@@ -136,14 +136,20 @@ Kirigami.Page {
currentIndex = filteredIdx.row;
onCurrentIndexChanged: {
var sourceIdx = kcm.filteredModel.mapToSource(kcm.filteredModel.index(sourcesList.currentIndex, 0));
appConfiguration.rootIndex = kcm.sourcesModel.makePersistentModelIndex(sourceIdx);
delegate: QtControls.ItemDelegate {
id: sourceDelegate
width: sourcesList.width
text: model.display
highlighted: ListView.isCurrentItem
onClicked: {
var sourceIdx = kcm.filteredModel.mapToSource(kcm.filteredModel.index(index, 0));
appConfiguration.rootIndex = kcm.sourcesModel.makePersistentModelIndex(sourceIdx);
sourcesList.currentIndex = index;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment