1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-25 05:52:50 -05:00

escape key handling

This commit is contained in:
bbedward
2025-08-05 09:15:27 -04:00
parent ef9e80bfdf
commit fccaf06baa
11 changed files with 191 additions and 19 deletions

View File

@@ -15,10 +15,14 @@ DankModal {
signal closingModal()
onVisibleChanged: {
if (!visible)
if (!visible) {
if (settingsVisible) {
settingsVisible = false;
}
closingModal();
}
}
visible: settingsVisible
width: 750
height: 750
@@ -27,12 +31,6 @@ DankModal {
settingsVisible = false;
}
FocusScope {
anchors.fill: parent
focus: settingsModal.settingsVisible
Keys.onEscapePressed: settingsModal.settingsVisible = false
}
content: Component {
Column {
anchors.fill: parent