[baobab/wip/cdavis/dark-style-opt-in] Opt-in to libhandy dark style preference




commit 5c57b5bd7f0debb01ce7d30cb8e20385a7550016
Author: Christopher Davis <christopherdavis gnome org>
Date:   Fri Oct 1 02:06:10 2021 -0700

    Opt-in to libhandy dark style preference
    
    GNOME 42 will have a system-wide dark style preference,
    libadwaita and libhandy now provide API for supporting it.
    libadwaita is planned to be part of the GNOME platform for
    the next release, it would be good to have our applications
    follow it.
    
    This commit adds support for the new dark style via
    libhandy.

 meson.build                 | 5 +++++
 src/baobab-application.vala | 1 +
 2 files changed, 6 insertions(+)
---
diff --git a/meson.build b/meson.build
index 8a5eb7e..4602e03 100644
--- a/meson.build
+++ b/meson.build
@@ -28,6 +28,11 @@ config_h_dir = include_directories('.')
 meson.add_install_script(python.find_installation('python3').path(),
   join_paths(meson.source_root(), 'build-aux', 'post-install.py'))
 
+add_project_arguments(
+  '--disable-since-check',
+  language: 'vala'
+)
+
 subdir('data')
 subdir('help')
 subdir('po')
diff --git a/src/baobab-application.vala b/src/baobab-application.vala
index dee0a03..9db69fe 100644
--- a/src/baobab-application.vala
+++ b/src/baobab-application.vala
@@ -81,6 +81,7 @@ namespace Baobab {
             base.startup ();
 
             Hdy.init ();
+            Hdy.StyleManager.get_default ().color_scheme = PREFER_LIGHT;
 
             // Load custom CSS
             var css_provider = new Gtk.CssProvider ();


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