From: Jeremy Bicha <jbicha@debian.org>
Date: Wed, 16 Feb 2022 10:14:46 -0500
Subject: Support GNOME 42 dark theme preference

https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/merge_requests/140
---
 gnome-initial-setup/gnome-initial-setup.c | 3 +++
 gnome-initial-setup/gnome-initial-setup.h | 1 +
 gnome-initial-setup/meson.build           | 1 +
 3 files changed, 5 insertions(+)

diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
index a4c6711..8dcb332 100644
--- a/gnome-initial-setup/gnome-initial-setup.c
+++ b/gnome-initial-setup/gnome-initial-setup.c
@@ -289,6 +289,9 @@ main (int argc, char *argv[])
 #endif
 
   gtk_init (&argc, &argv);
+  hdy_init ();
+  hdy_style_manager_set_color_scheme (hdy_style_manager_get_default (),
+    HDY_COLOR_SCHEME_PREFER_LIGHT);
 
   g_message ("Starting gnome-initial-setup");
   if (gis_get_mock_mode ())
diff --git a/gnome-initial-setup/gnome-initial-setup.h b/gnome-initial-setup/gnome-initial-setup.h
index 8880634..04d1ef4 100644
--- a/gnome-initial-setup/gnome-initial-setup.h
+++ b/gnome-initial-setup/gnome-initial-setup.h
@@ -25,6 +25,7 @@
 #include <gtk/gtk.h>
 #include <gio/gio.h>
 #include <glib/gi18n.h>
+#include <handy.h>
 
 typedef struct _GisDriver    GisDriver;
 typedef struct _GisAssistant GisAssistant;
diff --git a/gnome-initial-setup/meson.build b/gnome-initial-setup/meson.build
index 35c1668..96a279b 100644
--- a/gnome-initial-setup/meson.build
+++ b/gnome-initial-setup/meson.build
@@ -44,6 +44,7 @@ dependencies = [
     dependency ('gdm', version: '>= 3.8.3'),
     dependency ('geocode-glib-1.0'),
     dependency ('libgeoclue-2.0', version: '>= 2.3.1'),
+    dependency ('libhandy-1', version: '>= 1.5.90'),
     cc.find_library('m', required: false),
     dependency ('pango', version: '>= 1.32.5'),
     dependency ('rest-0.7'),
