Skip to content

Commit

Permalink
fix: update theme method to get system themes
Browse files Browse the repository at this point in the history
  • Loading branch information
edfloreshz committed Jul 11, 2024
1 parent b705459 commit 753bb0b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/app/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,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(),
}
}
Expand Down

0 comments on commit 753bb0b

Please sign in to comment.