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

launcher: built-in plugins, add settings search plugin with ? default

trigger
This commit is contained in:
bbedward
2026-01-05 21:46:12 -05:00
parent 0076c45496
commit 4484f6bd61
10 changed files with 398 additions and 136 deletions

View File

@@ -202,6 +202,7 @@ Singleton {
property bool _settingsWantsToggle: false
property string _settingsPendingTab: ""
property int _settingsPendingTabIndex: -1
function openSettings() {
if (settingsModal) {
@@ -226,6 +227,19 @@ Singleton {
}
}
function openSettingsWithTabIndex(tabIndex: int) {
if (settingsModal) {
settingsModal.showWithTab(tabIndex);
return;
}
if (settingsModalLoader) {
_settingsPendingTabIndex = tabIndex;
_settingsWantsOpen = true;
_settingsWantsToggle = false;
settingsModalLoader.activeAsync = true;
}
}
function closeSettings() {
settingsModal?.close();
}
@@ -303,7 +317,10 @@ Singleton {
function _onSettingsModalLoaded() {
if (_settingsWantsOpen) {
_settingsWantsOpen = false;
if (_settingsPendingTab) {
if (_settingsPendingTabIndex >= 0) {
settingsModal?.showWithTab(_settingsPendingTabIndex);
_settingsPendingTabIndex = -1;
} else if (_settingsPendingTab) {
settingsModal?.showWithTabName(_settingsPendingTab);
_settingsPendingTab = "";
} else {
@@ -313,7 +330,10 @@ Singleton {
}
if (_settingsWantsToggle) {
_settingsWantsToggle = false;
if (_settingsPendingTab) {
if (_settingsPendingTabIndex >= 0) {
settingsModal.currentTabIndex = _settingsPendingTabIndex;
_settingsPendingTabIndex = -1;
} else if (_settingsPendingTab) {
var idx = settingsModal?.resolveTabIndex(_settingsPendingTab) ?? -1;
if (idx >= 0)
settingsModal.currentTabIndex = idx;
@@ -358,10 +378,12 @@ Singleton {
}
function showProcessListModal() {
if (processListModalLoader) {
if (processListModal) {
processListModal.show();
} else if (processListModalLoader) {
processListModalLoader.active = true;
Qt.callLater(() => processListModal?.show());
}
processListModal?.show();
}
function hideProcessListModal() {
@@ -369,10 +391,12 @@ Singleton {
}
function toggleProcessListModal() {
if (processListModalLoader) {
if (processListModal) {
processListModal.toggle();
} else if (processListModalLoader) {
processListModalLoader.active = true;
Qt.callLater(() => processListModal?.show());
}
processListModal?.toggle();
}
function showColorPicker() {