summaryrefslogtreecommitdiff
path: root/gtk/gtkcssimageicontheme.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2015-12-02 03:18:26 +0100
committerBenjamin Otte <otte@redhat.com>2015-12-02 03:18:26 +0100
commitbc1b53a34c8666404bb2220a8c89ff81d10a3026 (patch)
treefe6918694968688f9a2c892ee340d5e234ed392a /gtk/gtkcssimageicontheme.c
parentd26a4b55558e50d86639747e4819ada671375287 (diff)
downloadgtk+-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.c11
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));