[libadwaita/wip/exalm/hicolor] main: Use hicolor icons
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/hicolor] main: Use hicolor icons
- Date: Tue, 4 May 2021 17:58:30 +0000 (UTC)
commit 85d708269158c5724dac79ce7a770f772cb8d4f6
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue May 4 22:57:42 2021 +0500
main: Use hicolor icons
Don't depend on adwaita-icon-theme, apps should bundle their icons instead.
Fixes https://gitlab.gnome.org/GNOME/libadwaita/-/issues/113
src/adw-main.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/src/adw-main.c b/src/adw-main.c
index 45a3c0d..829a8da 100644
--- a/src/adw-main.c
+++ b/src/adw-main.c
@@ -64,12 +64,23 @@ update_theme (void)
g_object_set (settings, "gtk-theme-name", new_theme_name, NULL);
}
+static inline void
+update_icons (void)
+{
+ g_object_set (gtk_settings_get_default (),
+ "gtk-icon-theme-name", "hicolor",
+ NULL);
+}
+
static void
setting_changed_cb (GdkDisplay *display,
const char *setting)
{
if (!g_strcmp0 (setting, "gtk-theme-name"))
update_theme ();
+
+ if (!g_strcmp0 (setting, "gtk-icon-theme-name"))
+ update_icons ();
}
static void
@@ -102,6 +113,7 @@ adw_style_init (void)
NULL);
update_theme ();
+ update_icons ();
g_once_init_leave (&guard, 1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]