Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 committed Sep 19, 2024
1 parent 3768b73 commit 447e140
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/StyleManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,11 @@ public class Granite.StyleManager : Object {

private void update_color_scheme () {
var gtk_settings = Gtk.Settings.get_for_display (display);
gtk_settings.gtk_application_prefer_dark_theme = prefers_dark ();
}

private bool prefers_dark () {
if (color_scheme_override == NO_PREFERENCE) {
var granite_settings = Granite.Settings.get_default ();
return granite_settings.prefers_color_scheme == DARK;
gtk_settings.gtk_application_prefer_dark_theme = granite_settings.prefers_color_scheme == DARK;
} else {
return color_scheme_override == DARK;
gtk_settings.gtk_application_prefer_dark_theme = color_scheme_override == DARK;
}
}
}

0 comments on commit 447e140

Please sign in to comment.