Skip to content

Commit

Permalink
Some more focus improvements and safeguard against tracker going RIP
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Apr 14, 2024
1 parent d1108e3 commit b682c7a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/qml/DashBoard.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Drawer {
}
}

onOpened: {
contentItem.forceActiveFocus()
}

width: Math.min( 300, mainWindow.width)
height: parent.height
edge: Qt.LeftEdge
Expand Down
1 change: 1 addition & 0 deletions src/qml/Legend.qml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ ListView {
onPressAndHold: {
itemProperties.index = legend.model.index(index, 0)
itemProperties.open()
itemProperties.forceActiveFocus()
}
onReleased: (mouse) => {
if (mouse.button === Qt.RightButton) {
Expand Down
5 changes: 3 additions & 2 deletions src/qml/TrackerSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Popup {
width: parent.width - Theme.popupScreenEdgeMargin
height: parent.height - Theme.popupScreenEdgeMargin * 2
modal: true
closePolicy: Popup.CloseOnEscape
closePolicy: Popup.NoAutoClose

property var tracker: undefined

Expand Down Expand Up @@ -549,6 +549,7 @@ Popup {
active: false
onLoaded: {
item.open()
item.forceActiveFocus()
}
}

Expand All @@ -565,7 +566,7 @@ Popup {
width: parent.width - Theme.popupScreenEdgeMargin
height: parent.height - Theme.popupScreenEdgeMargin * 2
modal: true
closePolicy: Popup.CloseOnEscape
closePolicy: Popup.NoAutoClose

FeatureForm {
id: form
Expand Down

0 comments on commit b682c7a

Please sign in to comment.