summaryrefslogtreecommitdiff
path: root/gtk/gtkfilesystem.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/gtkfilesystem.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/gtkfilesystem.c')
-rw-r--r--gtk/gtkfilesystem.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gtk/gtkfilesystem.c b/gtk/gtkfilesystem.c
index a26619443b..a69ba905f4 100644
--- a/gtk/gtkfilesystem.c
+++ b/gtk/gtkfilesystem.c
@@ -21,15 +21,16 @@
#include "config.h"
-#include <string.h>
+#include "gtkfilesystem.h"
+#include <string.h>
#include <glib/gi18n-lib.h>
#include "gtkfilechooser.h"
-#include "gtkfilesystem.h"
-#include "gtkicontheme.h"
-#include "gtkprivate.h"
+#include "gtkcssiconthemevalueprivate.h"
#include "gtkintl.h"
+#include "gtkprivate.h"
+#include "gtkstylecontextprivate.h"
/* #define DEBUG_MODE */
#ifdef DEBUG_MODE
@@ -707,14 +708,15 @@ get_surface_from_gicon (GIcon *icon,
gint icon_size,
GError **error)
{
- GdkScreen *screen;
+ GtkStyleContext *context;
GtkIconTheme *icon_theme;
GtkIconInfo *icon_info;
GdkPixbuf *pixbuf;
cairo_surface_t *surface;
- screen = gtk_widget_get_screen (GTK_WIDGET (widget));
- icon_theme = gtk_icon_theme_get_for_screen (screen);
+ context = gtk_widget_get_style_context (widget);
+ icon_theme = gtk_css_icon_theme_value_get_icon_theme
+ (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_ICON_THEME));
icon_info = gtk_icon_theme_lookup_by_gicon_for_scale (icon_theme,
icon,
@@ -726,7 +728,7 @@ get_surface_from_gicon (GIcon *icon,
return NULL;
pixbuf = gtk_icon_info_load_symbolic_for_context (icon_info,
- gtk_widget_get_style_context (widget),
+ context,
NULL,
error);