fix: allow loading v1 themes
fallback to default value for missing attributes
This commit is contained in:
parent
58980231b9
commit
f268bb86cf
1 changed files with 10 additions and 0 deletions
|
|
@ -104,14 +104,19 @@ pub struct Theme {
|
||||||
pub active_hint: u32,
|
pub active_hint: u32,
|
||||||
/// cosmic-comp custom window hint color
|
/// cosmic-comp custom window hint color
|
||||||
pub window_hint: Option<Srgb>,
|
pub window_hint: Option<Srgb>,
|
||||||
|
#[serde(default)]
|
||||||
/// enables blurred transparency
|
/// enables blurred transparency
|
||||||
pub frosted: BlurStrength,
|
pub frosted: BlurStrength,
|
||||||
|
#[serde(default)]
|
||||||
/// frosted windows
|
/// frosted windows
|
||||||
pub frosted_windows: bool,
|
pub frosted_windows: bool,
|
||||||
|
#[serde(default)]
|
||||||
/// frosted system interface
|
/// frosted system interface
|
||||||
pub frosted_system_interface: bool,
|
pub frosted_system_interface: bool,
|
||||||
|
#[serde(default)]
|
||||||
/// frosted panel
|
/// frosted panel
|
||||||
pub frosted_panel: bool,
|
pub frosted_panel: bool,
|
||||||
|
#[serde(default)]
|
||||||
/// frosted applet popups
|
/// frosted applet popups
|
||||||
pub frosted_applets: bool,
|
pub frosted_applets: bool,
|
||||||
/// shade color for dialogs
|
/// shade color for dialogs
|
||||||
|
|
@ -876,6 +881,7 @@ pub struct ThemeBuilder {
|
||||||
#[serde(with = "color_serde_option")]
|
#[serde(with = "color_serde_option")]
|
||||||
#[cosmic_config_entry(with = ColorReprOption)]
|
#[cosmic_config_entry(with = ColorReprOption)]
|
||||||
pub destructive: Option<Srgb>,
|
pub destructive: Option<Srgb>,
|
||||||
|
#[serde(default)]
|
||||||
/// enabled blurred transparency
|
/// enabled blurred transparency
|
||||||
pub frosted: BlurStrength,
|
pub frosted: BlurStrength,
|
||||||
/// cosmic-comp window gaps size (outer, inner)
|
/// cosmic-comp window gaps size (outer, inner)
|
||||||
|
|
@ -886,12 +892,16 @@ pub struct ThemeBuilder {
|
||||||
#[serde(with = "color_serde_option")]
|
#[serde(with = "color_serde_option")]
|
||||||
#[cosmic_config_entry(with = ColorReprOption)]
|
#[cosmic_config_entry(with = ColorReprOption)]
|
||||||
pub window_hint: Option<Srgb>,
|
pub window_hint: Option<Srgb>,
|
||||||
|
#[serde(default)]
|
||||||
/// frosted windows
|
/// frosted windows
|
||||||
pub frosted_windows: bool,
|
pub frosted_windows: bool,
|
||||||
|
#[serde(default)]
|
||||||
/// frosted system interface
|
/// frosted system interface
|
||||||
pub frosted_system_interface: bool,
|
pub frosted_system_interface: bool,
|
||||||
|
#[serde(default)]
|
||||||
/// frosted panel
|
/// frosted panel
|
||||||
pub frosted_panel: bool,
|
pub frosted_panel: bool,
|
||||||
|
#[serde(default)]
|
||||||
/// frosted applet popups
|
/// frosted applet popups
|
||||||
pub frosted_applets: bool,
|
pub frosted_applets: bool,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue