[gnome-music/wip/cdavis/dark-style-opt-in] application: Opt in to libhandy dark style



commit 6036444a9d1dc1bbac0d7742e445201c62171c24
Author: Christopher Davis <christopherdavis gnome org>
Date:   Sat Sep 25 18:58:56 2021 -0700

    application: Opt in to libhandy dark style
    
    GNOME is getting support for a global dark style preference
    in GNOME 42. For GTK3 apps we can use libhandy to opt
    in to using this preference.

 gnomemusic/application.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/application.py b/gnomemusic/application.py
index c92a6aa1e..bcdb853f0 100644
--- a/gnomemusic/application.py
+++ b/gnomemusic/application.py
@@ -32,7 +32,7 @@
 
 from gettext import gettext as _
 
-from gi.repository import Gtk, Gio, GLib, Gdk, GObject
+from gi.repository import Gtk, Gio, GLib, Gdk, GObject, Handy
 
 from gnomemusic.coregrilo import CoreGrilo
 from gnomemusic.coremodel import CoreModel
@@ -220,6 +220,7 @@ class Application(Gtk.Application):
 
     def do_startup(self):
         Gtk.Application.do_startup(self)
+        Handy.StyleManager.get_default().set_color_scheme(Handy.ColorScheme.PREFER_LIGHT)
         self._set_actions()
 
     def _quit(self, action=None, param=None):


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