fix: avoid re-reading system theme from disk on every menu bar render
This commit is contained in:
parent
8c042673e7
commit
18b4450c0f
4 changed files with 36 additions and 15 deletions
|
|
@ -206,6 +206,8 @@ pub fn menu_bar<'a>(
|
|||
|
||||
//TODO: what to do if there are no profiles?
|
||||
|
||||
let color_scheme_kind = config.color_scheme_kind(core.system_theme());
|
||||
|
||||
responsive_menu_bar()
|
||||
.item_height(ItemHeight::Dynamic(40))
|
||||
.item_width(ItemWidth::Uniform(320))
|
||||
|
|
@ -267,7 +269,7 @@ pub fn menu_bar<'a>(
|
|||
MenuItem::Button(
|
||||
fl!("menu-color-schemes"),
|
||||
None,
|
||||
Action::ColorSchemes(config.color_scheme_kind()),
|
||||
Action::ColorSchemes(color_scheme_kind),
|
||||
),
|
||||
MenuItem::Button(
|
||||
fl!("menu-keyboard-shortcuts"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue