[gnome-tweaks] Opt it to dark mode user preference



commit bb3a0a291437b6128aa0bffd3d107c61f5137d35
Author: Maximiliano Sandoval R <msandova gnome org>
Date:   Tue Oct 5 08:52:04 2021 +0200

    Opt it to dark mode user preference

 gtweak/app.py | 5 +++++
 meson.build   | 2 ++
 2 files changed, 7 insertions(+)
---
diff --git a/gtweak/app.py b/gtweak/app.py
index a0a48a2..78334cd 100644
--- a/gtweak/app.py
+++ b/gtweak/app.py
@@ -7,6 +7,7 @@ import os.path
 from gi.repository import Gtk
 from gi.repository import Gio
 from gi.repository import GLib
+from gi.repository import Handy
 
 import gtweak
 from gtweak.defs import VERSION
@@ -73,6 +74,10 @@ class GnomeTweaks(Gtk.Application):
         about_action.connect("activate", self.about_cb)
         self.add_action(about_action)
 
+        # Opt in to dark mode.
+        style_manager = Handy.StyleManager.get_default()
+        style_manager.set_color_scheme(Handy.ColorScheme.PREFER_LIGHT)
+
     def reset_cb(self, action, parameter):
         dialog = Gtk.MessageDialog(self.win, 0, Gtk.MessageType.QUESTION,
                                    Gtk.ButtonsType.OK_CANCEL, _("Reset to Defaults"))
diff --git a/meson.build b/meson.build
index f41a7f6..53a8b0e 100644
--- a/meson.build
+++ b/meson.build
@@ -12,6 +12,8 @@ if not python3.found()
     error('No valid python3 installation found!')
 endif
 
+dependency('libhandy-1', version: '>=1.5')
+
 prefix = get_option('prefix')
 
 bindir = join_paths(prefix, get_option('bindir'))


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