Reload theme using ThemeSettings::reload_current_theme (#7522)
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
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user