feat: load preferred theme instead of using default

This commit is contained in:
Ashley Wulber 2024-05-30 14:15:19 -04:00 committed by Jeremy Soller
parent abf143cb9e
commit ac2e129e4d

View file

@ -31,8 +31,16 @@ pub enum AppTheme {
impl AppTheme {
pub fn theme(&self) -> theme::Theme {
match self {
Self::Dark => theme::Theme::dark(),
Self::Light => theme::Theme::light(),
Self::Dark => {
let mut t = theme::system_dark();
t.theme_type.prefer_dark(Some(true));
t
}
Self::Light => {
let mut t = theme::system_light();
t.theme_type.prefer_dark(Some(false));
t
}
Self::System => theme::system_preference(),
}
}