Fix previous theme not being applied on startup
This commit is contained in:
parent
ec3cfc33d6
commit
074966427d
1 changed files with 4 additions and 5 deletions
|
@ -62,6 +62,10 @@ pub enum LoadThemes {
|
||||||
|
|
||||||
pub fn init(themes_to_load: LoadThemes, cx: &mut AppContext) {
|
pub fn init(themes_to_load: LoadThemes, cx: &mut AppContext) {
|
||||||
cx.set_global(ThemeRegistry::default());
|
cx.set_global(ThemeRegistry::default());
|
||||||
|
match themes_to_load {
|
||||||
|
LoadThemes::JustBase => (),
|
||||||
|
LoadThemes::All => cx.global_mut::<ThemeRegistry>().load_user_themes(),
|
||||||
|
}
|
||||||
ThemeSettings::register(cx);
|
ThemeSettings::register(cx);
|
||||||
|
|
||||||
let mut prev_buffer_font_size = ThemeSettings::get_global(cx).buffer_font_size;
|
let mut prev_buffer_font_size = ThemeSettings::get_global(cx).buffer_font_size;
|
||||||
|
@ -73,11 +77,6 @@ pub fn init(themes_to_load: LoadThemes, cx: &mut AppContext) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.detach();
|
.detach();
|
||||||
|
|
||||||
match themes_to_load {
|
|
||||||
LoadThemes::JustBase => (),
|
|
||||||
LoadThemes::All => cx.global_mut::<ThemeRegistry>().load_user_themes(),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait ActiveTheme {
|
pub trait ActiveTheme {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue