mirror of
https://code.gri.mw/GUI/grim.git
synced 2026-07-11 17:28:55 +00:00
fix: initial color theme setup
This commit is contained in:
+3
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user