From ce7aca63b234664a1a8bfcf26860a18953ddbb29 Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Sat, 27 Nov 2021 00:35:03 -0800 Subject: [PATCH] application: Opt in to libhandy dark style preference GNOME 42 will have a dark style preference. This commit adds support for it by opting in via HdyStyleManager. --- src/calls-application.c | 5 +++++ src/meson.build | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/calls-application.c b/src/calls-application.c index d27ea0c..a56d465 100644 --- a/src/calls-application.c +++ b/src/calls-application.c @@ -358,11 +358,16 @@ startup (GApplication *application) { g_autoptr (GtkCssProvider) provider = NULL; g_autoptr (GError) error = NULL; + HdyStyleManager *style_manager; G_APPLICATION_CLASS (calls_application_parent_class)->startup (application); hdy_init (); + style_manager = hdy_style_manager_get_default (); + + hdy_style_manager_set_color_scheme (style_manager, HDY_COLOR_SCHEME_PREFER_LIGHT); + if (!call_audio_init (&error)) { g_warning ("Failed to init libcallaudio: %s", error->message); diff --git a/src/meson.build b/src/meson.build index 75ad9ba..18e02ad 100644 --- a/src/meson.build +++ b/src/meson.build @@ -31,7 +31,7 @@ calls_includes = [ top_include, src_include ] calls_deps = [ dependency('gobject-2.0', version: '>= 2.58'), dependency('gtk+-3.0'), - dependency('libhandy-1', version: '>= 1.1.90'), + dependency('libhandy-1', version: '>= 1.5.0'), dependency('libfeedback-0.0'), dependency('libpeas-1.0'), dependency('gom-1.0'),