[file-roller] Use HdyStyleManager and enable dark mode
- From: Jeremy Bicha <jbicha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller] Use HdyStyleManager and enable dark mode
- Date: Wed, 23 Feb 2022 21:24:30 +0000 (UTC)
commit c83abf0776fb7bf5db27e296013da19bf36d99cc
Author: Maximiliano Sandoval R <msandova gnome org>
Date: Tue Oct 5 08:26:46 2021 +0200
Use HdyStyleManager and enable dark mode
meson.build | 2 ++
src/fr-application.c | 6 ++++++
src/meson.build | 1 +
3 files changed, 9 insertions(+)
---
diff --git a/meson.build b/meson.build
index c1b9ce4d..cf5c4c75 100644
--- a/meson.build
+++ b/meson.build
@@ -6,6 +6,7 @@ project('file-roller', 'c',
glib_version = '>=2.38'
gtk_version = '>=3.22.0'
+hdy_version = '>=1.4.0'
nautilus_version = '>=3.28.0'
json_glib_version = '>=0.14.0'
libnotify_version = '>=0.4.3'
@@ -28,6 +29,7 @@ thread_dep = dependency('threads')
glib_dep = dependency('glib-2.0', version : glib_version)
gthread_dep = dependency('gthread-2.0')
gtk_dep = dependency('gtk+-3.0', version : gtk_version)
+hdy_dep = dependency('libhandy-1', version: hdy_version)
# Optional dependencies
diff --git a/src/fr-application.c b/src/fr-application.c
index 7b4cd95a..17df6eb6 100644
--- a/src/fr-application.c
+++ b/src/fr-application.c
@@ -28,6 +28,7 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <glib/gprintf.h>
+#include <handy.h>
#ifdef ENABLE_NOTIFICATION
# include <libnotify/notify.h>
#endif
@@ -448,6 +449,7 @@ static void
fr_application_startup (GApplication *application)
{
GtkSettings *gtk_settings;
+ HdyStyleManager *style_manager;
gboolean shell_shows_menubar;
g_application_set_resource_base_path (application, "/org/gnome/FileRoller");
@@ -471,6 +473,10 @@ fr_application_startup (GApplication *application)
"gtk-shell-shows-menubar", &shell_shows_menubar,
NULL);
+ hdy_init ();
+ hdy_style_manager_set_color_scheme (hdy_style_manager_get_default (),
+ HDY_COLOR_SCHEME_PREFER_LIGHT);
+
if (shell_shows_menubar)
initialize_app_menubar (application);
else
diff --git a/src/meson.build b/src/meson.build
index 8083aacc..c0d2fb9e 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -90,6 +90,7 @@ executable('file-roller',
glib_dep,
gthread_dep,
gtk_dep,
+ hdy_dep,
use_json_glib ? libjson_glib_dep : [],
use_libnotify ? libnotify_dep : [],
use_libarchive ? libarchive_dep : []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]