Skip to content

Commit

Permalink
Add Close Application Button in Select Tool Menu for Touch-Only Devic…
Browse files Browse the repository at this point in the history
…es (#12091)

* Add Close Application Button in Select Tool Menu for Touch-Only Devices

This commit introduces a "Close Application" button to the Select Tool menu in QGroundControl. The addition addresses the need for an accessible close option on touch-only devices that lack a physical keyboard (e.g., Steam Deck). By integrating this button directly into the interface, users can easily exit the application without requiring keyboard input, improving usability on mobile and handheld platforms.

* Update MainRootWindow.qml

QGroundControl.appName variable instead of "QGroundControl"
  • Loading branch information
NiklasVoigt authored Nov 14, 2024
1 parent 501d38b commit 3a0fd11
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/UI/MainRootWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,18 @@ ApplicationWindow {
}
}

SubMenuButton {
id: closeButton
height: toolSelectDialog._toolButtonHeight
Layout.fillWidth: true
text: qsTr("Close %1").arg(QGroundControl.appName)
onClicked: {
if (mainWindow.allowViewSwitch()) {
mainWindow.finishCloseProcess()
}
}
}

ColumnLayout {
width: innerLayout.width
spacing: 0
Expand Down

0 comments on commit 3a0fd11

Please sign in to comment.