diff options
author | Benjamin Otte <otte@redhat.com> | 2015-12-02 03:18:26 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2015-12-02 03:18:26 +0100 |
commit | bc1b53a34c8666404bb2220a8c89ff81d10a3026 (patch) | |
tree | fe6918694968688f9a2c892ee340d5e234ed392a /gtk/gtkcssimageicontheme.c | |
parent | d26a4b55558e50d86639747e4819ada671375287 (diff) | |
download | gtk+-bc1b53a34c8666404bb2220a8c89ff81d10a3026.tar.gz |
css: Query icon theme from style, not from settings
No need to look at the settings when the CSS has a property for the icon
theme.
Diffstat (limited to 'gtk/gtkcssimageicontheme.c')
-rw-r--r-- | gtk/gtkcssimageicontheme.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/gtk/gtkcssimageicontheme.c b/gtk/gtkcssimageicontheme.c index 484b77a942..73c8a628a1 100644 --- a/gtk/gtkcssimageicontheme.c +++ b/gtk/gtkcssimageicontheme.c @@ -23,6 +23,7 @@ #include <math.h> +#include "gtkcssiconthemevalueprivate.h" #include "gtkcssrgbavalueprivate.h" #include "gtksettingsprivate.h" #include "gtkstyleproviderprivate.h" @@ -133,18 +134,10 @@ gtk_css_image_icon_theme_compute (GtkCssImage *image, { GtkCssImageIconTheme *icon_theme = GTK_CSS_IMAGE_ICON_THEME (image); GtkCssImageIconTheme *copy; - GtkSettings *settings; - GdkScreen *screen; - - settings = _gtk_style_provider_private_get_settings (provider); - if (settings == NULL) - screen = gdk_screen_get_default (); - else - screen = _gtk_settings_get_screen (settings); copy = g_object_new (GTK_TYPE_CSS_IMAGE_ICON_THEME, NULL); copy->name = g_strdup (icon_theme->name); - copy->icon_theme = gtk_icon_theme_get_for_screen (screen); + copy->icon_theme = gtk_css_icon_theme_value_get_icon_theme (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_ICON_THEME)); copy->scale = _gtk_style_provider_private_get_scale (provider); copy->color = *_gtk_css_rgba_value_get_rgba (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_COLOR)); |