From bad0942ef73770d14b7428f763ead65ac2496534 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Wed, 30 Oct 2024 15:05:53 +0100 Subject: [PATCH] fix(appearance): context drawer stops working on theme reload --- cosmic-settings/src/pages/desktop/appearance/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cosmic-settings/src/pages/desktop/appearance/mod.rs b/cosmic-settings/src/pages/desktop/appearance/mod.rs index 6440ac36..7a7196b1 100644 --- a/cosmic-settings/src/pages/desktop/appearance/mod.rs +++ b/cosmic-settings/src/pages/desktop/appearance/mod.rs @@ -1165,6 +1165,7 @@ impl Page { } fn reload_theme_mode(&mut self) { + let entity = self.entity; let font_config = std::mem::take(&mut self.font_config); let icon_themes = std::mem::take(&mut self.icon_themes); let icon_handles = std::mem::take(&mut self.icon_handles); @@ -1172,6 +1173,7 @@ impl Page { let day_time = self.day_time; *self = Self::from((self.theme_mode_config.clone(), self.theme_mode)); + self.entity = entity; self.day_time = day_time; self.icon_themes = icon_themes; self.icon_handles = icon_handles;