[gnome-music/wip/cdavis/dark-style-opt-in: 6/7] application: Opt in to libhandy dark style
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/cdavis/dark-style-opt-in: 6/7] application: Opt in to libhandy dark style
- Date: Thu, 7 Oct 2021 10:14:58 +0000 (UTC)
commit f883df02bffa82efbc8a13b52943b875fbade8a3
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 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gnomemusic/application.py b/gnomemusic/application.py
index c92a6aa1e..17ac06b46 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,8 @@ 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]