1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

Revert "modals: single window optimization"

This reverts commit 468e569bc7.
This commit is contained in:
bbedward
2025-12-03 10:34:40 -05:00
parent c331e2f39e
commit f3f7cc9077
19 changed files with 640 additions and 661 deletions

View File

@@ -51,21 +51,7 @@ Item {
anchors.fill: parent
focus: true
clip: false
onActiveFocusChanged: {
if (!activeFocus)
return;
if (!searchField)
return;
searchField.forceActiveFocus();
}
Keys.onPressed: event => {
const menu = usePopupContextMenu ? popupContextMenu : layerContextMenuLoader.item;
if (menu?.visible) {
menu.handleKey(event);
return;
}
if (event.key === Qt.Key_Escape) {
if (parentModal)
parentModal.hide();
@@ -211,6 +197,7 @@ Item {
parent: spotlightKeyHandler
appLauncher: spotlightKeyHandler.appLauncher
parentHandler: spotlightKeyHandler
searchField: spotlightKeyHandler.searchField
visible: false
z: 1000
@@ -231,6 +218,8 @@ Item {
sourceComponent: Component {
SpotlightContextMenu {
appLauncher: spotlightKeyHandler.appLauncher
parentHandler: spotlightKeyHandler
parentModal: spotlightKeyHandler.parentModal
}
}
}
@@ -291,12 +280,6 @@ Item {
updateSearchMode();
}
Keys.onPressed: event => {
const menu = spotlightKeyHandler.usePopupContextMenu ? popupContextMenu : layerContextMenuLoader.item;
if (menu?.visible) {
menu.handleKey(event);
return;
}
if (event.key === Qt.Key_Escape) {
if (parentModal)
parentModal.hide();
@@ -329,7 +312,7 @@ Item {
Row {
id: viewModeButtons
spacing: Theme.spacingXS
visible: searchMode === "apps"
visible: searchMode === "apps" && appLauncher.model.count > 0
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter