Skip to content

Commit

Permalink
Merge pull request #48 from nazar-pc/better-dark-theme-support
Browse files Browse the repository at this point in the history
Better dark theme support
  • Loading branch information
nazar-pc authored Dec 17, 2023
2 parents f0636d4 + 854b983 commit ec03f12
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,10 +619,9 @@ impl Cli {

// Prefer dark theme in cross-platform way if environment is configured that way
if let Some(settings) = gtk::Settings::default() {
settings.set_gtk_application_prefer_dark_theme(!matches!(
dark_light::detect(),
dark_light::Mode::Light
));
if matches!(dark_light::detect(), dark_light::Mode::Dark) {
settings.set_gtk_application_prefer_dark_theme(true);
}
}

let exit_status_code = Arc::new(Atomic::new(AppStatusCode::Exit));
Expand Down

0 comments on commit ec03f12

Please sign in to comment.