mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-05-31 17:54:41 +00:00
ColorScheme: fixed important bug preventing templates generation when using predefined color schemes and toggling an app.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user