[evince/wip/nielsdg/night-mode-gives-dark-theme] ev-window: Show dark theme when night mode is active



commit 520295834c840f0eeea523b2cec289988a73ccab
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Thu Jun 4 11:20:37 2020 +0200

    ev-window: Show dark theme when night mode is active
    
    Fixes https://gitlab.gnome.org/GNOME/evince/-/issues/627

 shell/ev-window.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 6c8919ed..2119576c 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -5299,6 +5299,11 @@ ev_window_inverted_colors_changed_cb (EvDocumentModel *model,
        g_simple_action_set_state (G_SIMPLE_ACTION (action),
                                   g_variant_new_boolean (inverted_colors));
 
+       /* Active GTK dark theme */
+       g_object_set (gtk_settings_get_default (),
+                     "gtk-application-prefer-dark-theme", inverted_colors,
+                     NULL);
+
        if (priv->metadata && !ev_window_is_empty (window))
                ev_metadata_set_boolean (priv->metadata, "inverted-colors",
                                         inverted_colors);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]