mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-10 15:52:58 -04:00
themes: support for variants
This commit is contained in:
@@ -65,6 +65,7 @@ Singleton {
|
||||
property string currentThemeName: "blue"
|
||||
property string currentThemeCategory: "generic"
|
||||
property string customThemeFile: ""
|
||||
property var registryThemeVariants: ({})
|
||||
property string matugenScheme: "scheme-tonal-spot"
|
||||
property bool runUserMatugenTemplates: true
|
||||
property string matugenTargetMonitor: ""
|
||||
@@ -1556,6 +1557,19 @@ Singleton {
|
||||
return workspaceNameIcons[workspaceName] || null;
|
||||
}
|
||||
|
||||
function getRegistryThemeVariant(themeId, defaultVariant) {
|
||||
return registryThemeVariants[themeId] || defaultVariant || "";
|
||||
}
|
||||
|
||||
function setRegistryThemeVariant(themeId, variantId) {
|
||||
var variants = JSON.parse(JSON.stringify(registryThemeVariants));
|
||||
variants[themeId] = variantId;
|
||||
registryThemeVariants = variants;
|
||||
saveSettings();
|
||||
if (typeof Theme !== "undefined")
|
||||
Theme.reloadCustomThemeVariant();
|
||||
}
|
||||
|
||||
function toggleDankBarVisible() {
|
||||
const defaultBar = barConfigs[0] || getBarConfig("default");
|
||||
if (defaultBar) {
|
||||
|
||||
Reference in New Issue
Block a user