[evince/wip/exalm/dark: 16/17] application: Support dark style preference




commit 36f935f48d10ba0cbeb4066e076c432359e90dac
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Jan 5 23:24:22 2022 +0500

    application: Support dark style preference

 meson.build               | 7 ++++++-
 shell/ev-application.c    | 2 ++
 subprojects/libhandy.wrap | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 73dfd5381..410f70f65 100644
--- a/meson.build
+++ b/meson.build
@@ -4,6 +4,11 @@ project(
   license: 'GPL2+',
   default_options: 'buildtype=debugoptimized',
   meson_version: '>= 0.53.0',
+  default_options: [
+    'libhandy:vapi=false',
+    'libhandy:introspection=disabled',
+    'libhandy:tests=false',
+  ]
 )
 
 if get_option('development')
@@ -145,7 +150,7 @@ top_inc = include_directories('.')
 
 glib_req_version = '>= 2.44.0'
 gtk_req_version = '>= 3.22.0'
-hdy_req_version = '>= 1.0.0'
+hdy_req_version = '>= 1.5.0'
 
 gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0', version: '>= 2.40.0')
 config_h.set_quoted('EXTRA_GDK_PIXBUF_LOADERS_DIR',
diff --git a/shell/ev-application.c b/shell/ev-application.c
index c01f35544..bd4d64b07 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -999,6 +999,8 @@ ev_application_startup (GApplication *gapplication)
         G_APPLICATION_CLASS (ev_application_parent_class)->startup (gapplication);
 
         hdy_init ();
+        hdy_style_manager_set_color_scheme (hdy_style_manager_get_default (),
+                                            HDY_COLOR_SCHEME_PREFER_LIGHT);
 
         for (it = action_accels; it[0]; it += g_strv_length ((gchar **)it) + 1)
                 gtk_application_set_accels_for_action (GTK_APPLICATION (application), it[0], &it[1]);
diff --git a/subprojects/libhandy.wrap b/subprojects/libhandy.wrap
index 24c18155a..0ec55a48f 100644
--- a/subprojects/libhandy.wrap
+++ b/subprojects/libhandy.wrap
@@ -2,4 +2,4 @@
 directory=libhandy
 url=https://gitlab.gnome.org/GNOME/libhandy.git
 # See comment in meson.build
-revision=e455f608e7a4ac4ab51e0bb70296f40862054f2b
+revision=6de728849ff1ac3dbed051146e9f094518d81b2f


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