fix: avoid re-reading system theme from disk on every menu bar render

This commit is contained in:
James Feister 2026-06-12 13:47:00 -07:00 committed by GitHub
parent 8c042673e7
commit 18b4450c0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 36 additions and 15 deletions

View file

@ -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"),