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:
parent
45cf36e870
commit
374c8a4c8c
3 changed files with 8 additions and 36 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue