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.
This commit is contained in:
Christopher Davis
2021-11-27 00:35:03 -08:00
parent aaf87e5e89
commit ce7aca63b2
2 changed files with 6 additions and 1 deletions

View File

@@ -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);