From bb7e00b0eb29f05d25b2fa3456c5c1a98fdd008d Mon Sep 17 00:00:00 2001 From: ardocrat Date: Sat, 29 Mar 2025 21:52:10 +0300 Subject: [PATCH] fix: initial color theme setup --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 7c8d5258..d1c13ac2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -128,7 +128,9 @@ pub fn start(options: NativeOptions, app_creator: eframe::AppCreator) -> eframe: /// Setup application [`egui::Style`] and [`egui::Visuals`]. pub fn setup_visuals(ctx: &Context) { let use_dark = AppConfig::dark_theme().unwrap_or_else(|| { - ctx.system_theme().unwrap_or(Theme::Dark) == Theme::Dark + let use_dark = ctx.system_theme().unwrap_or(Theme::Dark) == Theme::Dark; + AppConfig::set_dark_theme(use_dark); + use_dark }); let mut style = (*ctx.style()).clone();