From: Jeremy Bicha <jbicha@debian.org>
Date: Tue, 15 Feb 2022 08:40:35 -0500
Subject: Support GNOME 42 dark theme preference

Forwarded: https://gitlab.gnome.org/GNOME/geary/-/merge_requests/723
---
 meson.build                                    | 2 +-
 src/client/application/application-client.vala | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 87261ba..3b487e1 100644
--- a/meson.build
+++ b/meson.build
@@ -88,7 +88,7 @@ icu_uc = dependency('icu-uc', version: '>=60')
 iso_codes = dependency('iso-codes')
 javascriptcoregtk = dependency('javascriptcoregtk-4.1', version: '>=' + target_webkit)
 json_glib = dependency('json-glib-1.0', version: '>= 1.0')
-libhandy = dependency('libhandy-1', version: '>= 1.2.1', required: false)
+libhandy = dependency('libhandy-1', version: '>= 1.6.0', required: false)
 libmath = cc.find_library('m')
 libpeas = dependency('libpeas-1.0', version: '>= 1.24.0')
 libsecret = dependency('libsecret-1', version: '>= 0.11')
diff --git a/src/client/application/application-client.vala b/src/client/application/application-client.vala
index 51d0f63..71b626a 100644
--- a/src/client/application/application-client.vala
+++ b/src/client/application/application-client.vala
@@ -372,6 +372,8 @@ public class Application.Client : Gtk.Application {
         // Calls Gtk.init(), amongst other things
         base.startup();
         Hdy.init();
+        Hdy.StyleManager.get_default().set_color_scheme(
+            Hdy.ColorScheme.PREFER_LIGHT);
 
         this.engine = new Geary.Engine(get_resource_directory());
         this.config = new Configuration(SCHEMA_ID);
