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

settings: add IPCs to open specific settings tabs

This commit is contained in:
bbedward
2025-12-04 14:31:20 -05:00
parent 2aabee453b
commit 397a8c275d
9 changed files with 256 additions and 35 deletions

View File

@@ -10,6 +10,7 @@ FloatingWindow {
property alias profileBrowser: profileBrowser
property alias wallpaperBrowser: wallpaperBrowser
property alias sidebar: sidebar
property int currentTabIndex: 0
property bool shouldHaveFocus: visible
property bool allowFocusOverride: false
@@ -32,6 +33,23 @@ FloatingWindow {
visible = !visible;
}
function showWithTab(tabIndex: int) {
if (tabIndex >= 0)
currentTabIndex = tabIndex;
visible = true;
}
function showWithTabName(tabName: string) {
var idx = sidebar.resolveTabIndex(tabName);
if (idx >= 0)
currentTabIndex = idx;
visible = true;
}
function resolveTabIndex(tabName: string): int {
return sidebar.resolveTabIndex(tabName);
}
function toggleMenu() {
enableAnimations = true;
menuVisible = !menuVisible;