Skip to content

Commit

Permalink
fix(appearance): context drawer stops working on theme reload
Browse files Browse the repository at this point in the history
  • Loading branch information
mmstick committed Oct 30, 2024
1 parent a90a8b4 commit bad0942
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cosmic-settings/src/pages/desktop/appearance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1165,13 +1165,15 @@ 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);
let icon_theme_active = self.icon_theme_active.take();
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;
Expand Down

0 comments on commit bad0942

Please sign in to comment.