ColorScheme: fixed important bug preventing templates generation when using predefined color schemes and toggling an app.

This commit is contained in:
ItsLemmy
2025-10-13 21:35:49 -04:00
parent 58ebb9dfb7
commit 6f830234b7
2 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -91,11 +91,13 @@ Singleton {
Logger.log("AppThemeService", "Service started")
}
// --------------------------------------------------------------------------------
function generate() {
if (Settings.data.colorSchemes.useWallpaperColors) {
generateFromWallpaper()
} else {
generateFromPredefinedScheme()
// Re-apply the scheme, this is the best way to regenerate all templates too.
ColorSchemeService.applyScheme(Settings.data.colorSchemes.predefinedScheme)
}
}
+3 -3
View File
@@ -150,7 +150,7 @@ Singleton {
Logger.log("ColorScheme", "Applying color scheme:", getBasename(path))
// Generate Matugen templates if any are enabled and setting allows it
if (Settings.data.colorSchemes.generateTemplatesForPredefined && hasEnabledMatugenTemplates()) {
if (Settings.data.colorSchemes.generateTemplatesForPredefined && hasEnabledTemplates()) {
AppThemeService.generateFromPredefinedScheme(data)
}
} catch (e) {
@@ -159,8 +159,8 @@ Singleton {
}
}
// Check if any Matugen templates are enabled
function hasEnabledMatugenTemplates() {
// Check if any templates are enabled
function hasEnabledTemplates() {
return Settings.data.templates.gtk || Settings.data.templates.qt || Settings.data.templates.kitty || Settings.data.templates.ghostty || Settings.data.templates.foot || Settings.data.templates.fuzzel || Settings.data.templates.discord || Settings.data.templates.discord_vesktop || Settings.data.templates.discord_webcord
|| Settings.data.templates.discord_armcord || Settings.data.templates.discord_equibop || Settings.data.templates.discord_lightcord || Settings.data.templates.discord_dorion || Settings.data.templates.pywalfox
}