[gitg/system-dark-settings] Honor system preferences about using dark theme
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/system-dark-settings] Honor system preferences about using dark theme
- Date: Sun, 28 Aug 2022 16:54:34 +0000 (UTC)
commit 236aa89de9deb8c01650263fd77e7fae52573966
Author: Alberto Fanjul <albertofanjul gmail com>
Date: Sun Aug 28 18:35:54 2022 +0200
Honor system preferences about using dark theme
gitg/gitg-application.vala | 3 +++
gitg/meson.build | 1 +
meson.build | 1 +
3 files changed, 5 insertions(+)
---
diff --git a/gitg/gitg-application.vala b/gitg/gitg-application.vala
index d2930360..6294d965 100644
--- a/gitg/gitg-application.vala
+++ b/gitg/gitg-application.vala
@@ -382,6 +382,9 @@ public class Application : Gtk.Application
protected override void startup()
{
base.startup();
+ Hdy.init ();
+ var style_manager = Hdy.StyleManager.get_default();
+ style_manager.color_scheme = PREFER_LIGHT;
PlatformSupport.application_support_prepare_startup();
diff --git a/gitg/meson.build b/gitg/meson.build
index ad551c6f..4b108a14 100644
--- a/gitg/meson.build
+++ b/gitg/meson.build
@@ -64,6 +64,7 @@ sources = gitg_sources + files(
deps = [
config_dep,
+ hdy_dep,
gitg_platform_support_dep,
gobject_introspection_dep,
gtksourceview_dep,
diff --git a/meson.build b/meson.build
index 75442e51..d2e507c4 100644
--- a/meson.build
+++ b/meson.build
@@ -122,6 +122,7 @@ common_ldflags = cc.get_supported_link_arguments('-Wl,--version-script,@0@'.form
glib_req_version = '>= 2.68'
+hdy_dep = dependency('libhandy-1', version: '>= 1.5.0')
gee_dep = dependency('gee-0.8')
gio_dep = dependency('gio-2.0', version: glib_req_version)
glib_dep = dependency('glib-2.0', version: glib_req_version)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]