Reload theme using `ThemeSettings::reload_current_theme` (#7522)
Marshall Bowers
created
This PR updates the various spots where we reload the theme to use
`ThemeSettings::reload_current_theme` instead of duplicating the code
each time.
Release Notes:
- N/A
@@ -34,6 +34,10 @@ pub struct ThemeSettings {
}
impl ThemeSettings {
+ /// Reloads the current theme.
+ ///
+ /// Reads the [`ThemeSettings`] to know which theme should be loaded,
+ /// taking into account the current [`SystemAppearance`].
pub fn reload_current_theme(cx: &mut AppContext) {
let mut theme_settings = ThemeSettings::get_global(cx).clone();