File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,21 @@ public class Tomato : Gtk.Application {
4141 Intl . textdomain (Build . GETTEXT_PACKAGE );
4242
4343 var quit_action = new SimpleAction (" quit" , null );
44-
44+ quit_action . activate . connect (quit);
4545 add_action (quit_action);
46- set_accels_for_action (" app.quit" , {" <Control>q" });
46+
47+ set_accels_for_action (" app.quit" , { " <Control>q" });
48+
49+ var granite_settings = Granite . Settings . get_default ();
50+ var gtk_settings = Gtk . Settings . get_default ();
4751
48- quit_action. activate. connect (quit);
52+ gtk_settings. gtk_application_prefer_dark_theme =
53+ granite_settings. prefers_color_scheme == DARK ;
54+
55+ granite_settings. notify[" prefers-color-scheme" ]. connect (() = > {
56+ gtk_settings. gtk_application_prefer_dark_theme =
57+ granite_settings. prefers_color_scheme == DARK ;
58+ });
4959 }
5060
5161 protected override void activate () {
You can’t perform that action at this time.
0 commit comments