Skip to content

Commit

Permalink
Better dark theme support
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Dec 17, 2023
1 parent f0636d4 commit 854b983
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 854b983

Please sign in to comment.