From f268bb86cf3574fddc70e8b78aae29e2dd1049e4 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 13 May 2026 15:05:21 -0400 Subject: [PATCH] fix: allow loading v1 themes fallback to default value for missing attributes --- cosmic-theme/src/model/theme.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cosmic-theme/src/model/theme.rs b/cosmic-theme/src/model/theme.rs index b2daabe7..e68d9a09 100644 --- a/cosmic-theme/src/model/theme.rs +++ b/cosmic-theme/src/model/theme.rs @@ -104,14 +104,19 @@ pub struct Theme { pub active_hint: u32, /// cosmic-comp custom window hint color pub window_hint: Option, + #[serde(default)] /// enables blurred transparency pub frosted: BlurStrength, + #[serde(default)] /// frosted windows pub frosted_windows: bool, + #[serde(default)] /// frosted system interface pub frosted_system_interface: bool, + #[serde(default)] /// frosted panel pub frosted_panel: bool, + #[serde(default)] /// frosted applet popups pub frosted_applets: bool, /// shade color for dialogs @@ -876,6 +881,7 @@ pub struct ThemeBuilder { #[serde(with = "color_serde_option")] #[cosmic_config_entry(with = ColorReprOption)] pub destructive: Option, + #[serde(default)] /// enabled blurred transparency pub frosted: BlurStrength, /// cosmic-comp window gaps size (outer, inner) @@ -886,12 +892,16 @@ pub struct ThemeBuilder { #[serde(with = "color_serde_option")] #[cosmic_config_entry(with = ColorReprOption)] pub window_hint: Option, + #[serde(default)] /// frosted windows pub frosted_windows: bool, + #[serde(default)] /// frosted system interface pub frosted_system_interface: bool, + #[serde(default)] /// frosted panel pub frosted_panel: bool, + #[serde(default)] /// frosted applet popups pub frosted_applets: bool, }