Commit fa2837db authored by Carl Schwan's avatar Carl Schwan 🚴
Browse files

Improve tab focus of the application lists

parent 0ee16d66
......@@ -104,6 +104,11 @@ DiscoverPage {
Kirigami.CardsListView {
id: apps
activeFocusOnTab: true
currentIndex: -1
onActiveFocusChanged: if (activeFocus && currentIndex === -1) {
currentIndex = 0;
}
section.delegate: Label {
text: section
......@@ -121,7 +126,6 @@ DiscoverPage {
apps.currentIndex = -1
}
}
currentIndex: -1
delegate: ApplicationDelegate {
application: model.application
compact: !applicationWindow().wideScreen
......
......@@ -94,7 +94,11 @@ DiscoverPage
Kirigami.CardsListView {
id: apps
model: FeaturedModel {}
activeFocusOnTab: true
Component.onCompleted: apps.bottomMargin = Kirigami.Units.largeSpacing * 2
onActiveFocusChanged: if (activeFocus && currentIndex === -1) {
currentIndex = 0;
}
currentIndex: -1
delegate: ApplicationDelegate {
application: model.application
......
......@@ -84,8 +84,7 @@ ConditionalLoader
enabled: application.state !== AbstractResource.Broken
text: compact ? "" : root.text
icon.name: compact ? root.action.icon.name : ""
focus: true
activeFocusOnTab: false
onClicked: root.click()
}
}
Supports Markdown
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