From aad897f45d7fedc6f89aad355a8cb38ff7f6625a Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 10 Oct 2023 12:43:53 -0400 Subject: [PATCH] fix: Theme CosmicConfigEntry impl --- cosmic-theme/src/model/theme.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/cosmic-theme/src/model/theme.rs b/cosmic-theme/src/model/theme.rs index 7a2df559..2437e0df 100644 --- a/cosmic-theme/src/model/theme.rs +++ b/cosmic-theme/src/model/theme.rs @@ -105,6 +105,9 @@ impl cosmic_config::CosmicConfigEntry for Theme { tx.set("is_high_contrast", self_.is_high_contrast)?; tx.set("spacing", self_.spacing)?; tx.set("corner_radii", self_.corner_radii)?; + tx.set("active_hint", self_.active_hint)?; + tx.set("gaps", self_.gaps)?; + tx.set("window_hint", self_.window_hint)?; tx.commit() } @@ -165,7 +168,18 @@ impl cosmic_config::CosmicConfigEntry for Theme { Ok(corner_radii) => default.corner_radii = corner_radii, Err(e) => errors.push(e), } - + match config.get::("active_hint") { + Ok(active_hint) => default.active_hint = active_hint, + Err(e) => errors.push(e), + } + match config.get::<(u32, u32)>("gaps") { + Ok(gaps) => default.gaps = gaps, + Err(e) => errors.push(e), + } + match config.get::>("window_hint") { + Ok(window_hint) => default.window_hint = window_hint, + Err(e) => errors.push(e), + } if errors.is_empty() { Ok(default) } else {