mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 14:05:38 -05:00
feat: Integrate full shell dynamic theming system
This commit is contained in:
@@ -52,6 +52,8 @@ Singleton {
|
||||
property string fontFamily: "Inter Variable"
|
||||
property string monoFontFamily: "Fira Code"
|
||||
property int fontWeight: Font.Normal
|
||||
property bool gtkThemingEnabled: false
|
||||
property bool qtThemingEnabled: false
|
||||
|
||||
readonly property string defaultFontFamily: "Inter Variable"
|
||||
readonly property string defaultMonoFontFamily: "Fira Code"
|
||||
@@ -131,6 +133,8 @@ Singleton {
|
||||
fontFamily = settings.fontFamily !== undefined ? settings.fontFamily : defaultFontFamily;
|
||||
monoFontFamily = settings.monoFontFamily !== undefined ? settings.monoFontFamily : defaultMonoFontFamily;
|
||||
fontWeight = settings.fontWeight !== undefined ? settings.fontWeight : Font.Normal;
|
||||
gtkThemingEnabled = settings.gtkThemingEnabled !== undefined ? settings.gtkThemingEnabled : false;
|
||||
qtThemingEnabled = settings.qtThemingEnabled !== undefined ? settings.qtThemingEnabled : false;
|
||||
applyStoredTheme();
|
||||
detectAvailableIconThemes();
|
||||
detectQtTools();
|
||||
@@ -182,7 +186,9 @@ Singleton {
|
||||
"doNotDisturb": doNotDisturb,
|
||||
"fontFamily": fontFamily,
|
||||
"monoFontFamily": monoFontFamily,
|
||||
"fontWeight": fontWeight
|
||||
"fontWeight": fontWeight,
|
||||
"gtkThemingEnabled": gtkThemingEnabled,
|
||||
"qtThemingEnabled": qtThemingEnabled
|
||||
}, null, 2));
|
||||
}
|
||||
|
||||
@@ -579,6 +585,16 @@ Singleton {
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
function setGtkThemingEnabled(enabled) {
|
||||
gtkThemingEnabled = enabled;
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
function setQtThemingEnabled(enabled) {
|
||||
qtThemingEnabled = enabled;
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
// Helper to safely single-quote shell strings
|
||||
function _shq(s) {
|
||||
return "'" + String(s).replace(/'/g, "'\\''") + "'";
|
||||
|
||||
Reference in New Issue
Block a user