From ac2e129e4dd436e9d38a0a4da6ce8f1d89c5fd3f Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Thu, 30 May 2024 14:15:19 -0400 Subject: [PATCH] feat: load preferred theme instead of using default --- src/config.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index f62f329..1707cfe 100644 --- a/src/config.rs +++ b/src/config.rs @@ -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(), } }