Commit 2759ca41 authored by Marco Martin's avatar Marco Martin

better keyboard navigation

parent c5a62a5e
......@@ -172,6 +172,11 @@ Kirigami.ScrollablePage {
systemsettings.requestToolTip(index, delegate.mapToItem(root, 0, 0, width, height));
}
}
onFocusChanged: {
if (focus) {
onCurrentIndexChanged: categoryView.positionViewAtIndex(index, ListView.Contain);
}
}
checked: systemsettings.activeCategory == index
Keys.onPressed: {
switch (event.key) {
......
......@@ -73,6 +73,11 @@ Kirigami.ScrollablePage {
activeFocusOnTab: root.pageStack.currentIndex == 1
highlighted: focus
onClicked: systemsettings.activeSubCategory = index
onFocusChanged: {
if (focus) {
onCurrentIndexChanged: subCategoryView.positionViewAtIndex(index, ListView.Contain);
}
}
checked: systemsettings.activeSubCategory == index
checkable: false
Keys.onPressed: {
......
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