1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-08 06:28:27 -04:00

launcher: add IPC feature-parity to spotlight-bar and improve list view

transitions

port 1.5

(cherry picked from commit 197d17ac4e)
This commit is contained in:
bbedward
2026-07-13 11:25:01 -04:00
committed by dms-ci[bot]
parent 28c25d46d5
commit dd9edd8a00
5 changed files with 140 additions and 25 deletions
+61 -2
View File
@@ -671,6 +671,8 @@ Singleton {
property bool _spotlightBarWantsOpen: false
property bool _spotlightBarWantsToggle: false
property string _spotlightBarPendingQuery: ""
property string _spotlightBarPendingMode: ""
function openSpotlightBar() {
if (spotlightBarModal) {
@@ -682,6 +684,28 @@ Singleton {
}
}
function openSpotlightBarWithQuery(query: string) {
if (spotlightBarModal) {
spotlightBarModal.showWithQuery(query);
} else if (spotlightBarModalLoader) {
_spotlightBarPendingQuery = query;
_spotlightBarWantsOpen = true;
_spotlightBarWantsToggle = false;
spotlightBarModalLoader.active = true;
}
}
function openSpotlightBarWithMode(mode: string) {
if (spotlightBarModal) {
spotlightBarModal.showWithMode(mode);
} else if (spotlightBarModalLoader) {
_spotlightBarPendingMode = mode;
_spotlightBarWantsOpen = true;
_spotlightBarWantsToggle = false;
spotlightBarModalLoader.active = true;
}
}
function closeSpotlightBar() {
spotlightBarModal?.hide();
}
@@ -696,15 +720,50 @@ Singleton {
}
}
function toggleSpotlightBarWithMode(mode: string) {
if (spotlightBarModal) {
spotlightBarModal.toggleWithMode(mode);
} else if (spotlightBarModalLoader) {
_spotlightBarPendingMode = mode;
_spotlightBarWantsToggle = true;
_spotlightBarWantsOpen = false;
spotlightBarModalLoader.active = true;
}
}
function toggleSpotlightBarWithQuery(query: string) {
if (spotlightBarModal) {
spotlightBarModal.toggleWithQuery(query);
} else if (spotlightBarModalLoader) {
_spotlightBarPendingQuery = query;
_spotlightBarWantsOpen = true;
_spotlightBarWantsToggle = false;
spotlightBarModalLoader.active = true;
}
}
function _onSpotlightBarModalLoaded() {
if (_spotlightBarWantsOpen) {
_spotlightBarWantsOpen = false;
spotlightBarModal?.show();
if (_spotlightBarPendingQuery) {
spotlightBarModal?.showWithQuery(_spotlightBarPendingQuery);
_spotlightBarPendingQuery = "";
} else if (_spotlightBarPendingMode) {
spotlightBarModal?.showWithMode(_spotlightBarPendingMode);
_spotlightBarPendingMode = "";
} else {
spotlightBarModal?.show();
}
return;
}
if (_spotlightBarWantsToggle) {
_spotlightBarWantsToggle = false;
spotlightBarModal?.toggle();
if (_spotlightBarPendingMode) {
spotlightBarModal?.toggleWithMode(_spotlightBarPendingMode);
_spotlightBarPendingMode = "";
} else {
spotlightBarModal?.toggle();
}
}
}