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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user