[gnome-builder/wip/gtk4-port: 384/736] libide/gui: add dark helper
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 384/736] libide/gui: add dark helper
- Date: Tue, 26 Apr 2022 01:46:25 +0000 (UTC)
commit 1aeee3088f96eda8563ea6eca4b20660fc34d815
Author: Christian Hergert <chergert redhat com>
Date: Mon Apr 4 15:59:45 2022 -0700
libide/gui: add dark helper
src/libide/gui/ide-application-color.c | 8 ++++++++
src/libide/gui/ide-application.h | 2 ++
2 files changed, 10 insertions(+)
---
diff --git a/src/libide/gui/ide-application-color.c b/src/libide/gui/ide-application-color.c
index 6cbe322ba..de2e8a487 100644
--- a/src/libide/gui/ide-application-color.c
+++ b/src/libide/gui/ide-application-color.c
@@ -223,3 +223,11 @@ _ide_application_init_color (IdeApplication *self)
_ide_application_update_style_scheme (self);
ide_application_color_style_scheme_changed_cb (self, "style-scheme-name", self->editor_settings);
}
+
+gboolean
+ide_application_get_dark (IdeApplication *self)
+{
+ g_return_val_if_fail (IDE_IS_APPLICATION (self), FALSE);
+
+ return adw_style_manager_get_dark (adw_style_manager_get_default ());
+}
diff --git a/src/libide/gui/ide-application.h b/src/libide/gui/ide-application.h
index 1f8c1126d..dd679ffff 100644
--- a/src/libide/gui/ide-application.h
+++ b/src/libide/gui/ide-application.h
@@ -96,5 +96,7 @@ const char *ide_application_get_style_scheme (IdeApplication
IDE_AVAILABLE_IN_ALL
void ide_application_set_style_scheme (IdeApplication *self,
const char *style_scheme);
+IDE_AVAILABLE_IN_ALL
+gboolean ide_application_get_dark (IdeApplication *self);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]