refactor: introduce thread local THEME variable and distinguish between custom and system theme settings

This commit is contained in:
Ashley Wulber 2023-08-04 15:48:34 -04:00 committed by Ashley Wulber
parent 40efcbbe31
commit 6c57e04e36
8 changed files with 80 additions and 36 deletions

View file

@ -40,7 +40,7 @@ pub struct Core {
/// Scaling factor used by the application
scale_factor: f32,
pub theme: Theme,
pub system_theme: Theme,
pub(crate) title: String,
pub window: Window,
}
@ -56,7 +56,7 @@ impl Default for Core {
toggled_condensed: true,
},
scale_factor: 1.0,
theme: theme::theme(),
system_theme: theme::theme(),
title: String::new(),
window: Window {
can_fullscreen: false,