[gtk/fix-icontheme-invalidation: 7/18] css: Get the icon theme via the settings



commit 7aeef71a495cba91fa2d65e9e6a1765c3c569360
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Apr 21 20:41:59 2020 -0400

    css: Get the icon theme via the settings
    
    We don't have a css value for it anymore, but we
    still need the current icon theme to interpret
    icon names.

 gtk/gtkcssimageicontheme.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkcssimageicontheme.c b/gtk/gtkcssimageicontheme.c
index 4fed08546b..08fd70a61f 100644
--- a/gtk/gtkcssimageicontheme.c
+++ b/gtk/gtkcssimageicontheme.c
@@ -145,10 +145,14 @@ gtk_css_image_icon_theme_compute (GtkCssImage      *image,
 {
   GtkCssImageIconTheme *icon_theme = GTK_CSS_IMAGE_ICON_THEME (image);
   GtkCssImageIconTheme *copy;
+  GtkSettings *settings;
+  GdkDisplay *display;
 
   copy = g_object_new (GTK_TYPE_CSS_IMAGE_ICON_THEME, NULL);
   copy->name = g_strdup (icon_theme->name);
-  copy->icon_theme = icon_theme->icon_theme;
+  settings = gtk_style_provider_get_settings (provider);
+  display = _gtk_settings_get_display (settings);
+  copy->icon_theme = gtk_icon_theme_get_for_display (display);
   copy->scale = gtk_style_provider_get_scale (provider);
   gtk_icon_theme_lookup_symbolic_colors (style, &copy->color, &copy->success, &copy->warning, &copy->error);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]