fix drawer layout and focus move

This commit is contained in:
Cyril Anisimov 2024-10-20 21:44:44 +02:00
parent 2c9fa10b8b
commit 9cfa4c1389
3 changed files with 28 additions and 3 deletions

View file

@ -226,7 +226,7 @@ Item {
backButtonImage: root.headerBackButtonImage
backButtonFunction: function() { menu.closeTriggered() }
onActiveFocusChanged: {
if(activeFocus) {
if(backButton.enabled && backButton.activeFocus) {
root.listView.positionViewAtBeginning()
}
}
@ -235,9 +235,10 @@ Item {
Column {
id: col
anchors.top: parent.top
anchors.top: header.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: 16
spacing: 16

View file

@ -79,6 +79,30 @@ ListView {
property bool isFocusable: true
Keys.onTabPressed: {
FocusController.nextKeyTabItem()
}
Keys.onBacktabPressed: {
FocusController.previousKeyTabItem()
}
Keys.onUpPressed: {
FocusController.nextKeyUpItem()
}
Keys.onDownPressed: {
FocusController.nextKeyDownItem()
}
Keys.onLeftPressed: {
FocusController.nextKeyLeftItem()
}
Keys.onRightPressed: {
FocusController.nextKeyRightItem()
}
indicator: Rectangle {
width: parent.width - 1
height: parent.height

View file

@ -148,7 +148,7 @@ PageType {
clickedFunction: function() {
selector.text = selectedText
selector.close()
selector.closeTriggered()
if (SitesModel.routeMode !== root.routeModesModel[currentIndex].type) {
SitesModel.routeMode = root.routeModesModel[currentIndex].type
}