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

---
 meson.build                                    | 2 +-
 src/client/application/application-client.vala | 2 ++
 src/meson.build                                | 4 ++--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index d0af9ee..5f115eb 100644
--- a/meson.build
+++ b/meson.build
@@ -89,7 +89,7 @@ icu_uc = dependency('icu-uc', version: '>=60')
 iso_codes = dependency('iso-codes')
 javascriptcoregtk = dependency('javascriptcoregtk-4.0', 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.5.90', required: false)
 libmath = cc.find_library('m')
 libpeas = dependency('libpeas-1.0', version: '>= 1.24.0')
 libpeas_gtk = dependency('libpeas-gtk-1.0', version: '>= 1.24.0')
diff --git a/src/client/application/application-client.vala b/src/client/application/application-client.vala
index 6ce19ce..73eabb1 100644
--- a/src/client/application/application-client.vala
+++ b/src/client/application/application-client.vala
@@ -380,6 +380,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);
diff --git a/src/meson.build b/src/meson.build
index 5eded12..a544154 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -26,8 +26,8 @@ geary_vala_args = [
   '--enable-checking',
 ]
 
-# Remove once libhandy 1.0 has been packaged and is widely available
-if libhandy.version().version_compare('<1.0')
+# Remove once libhandy 1.6 has been packaged and is widely available
+if libhandy.version().version_compare('<1.6')
   geary_vala_args += [ '--disable-since-check' ]
 endif
 
