summaryrefslogtreecommitdiff
path: root/gtk/deprecated
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/deprecated
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/deprecated')
-rw-r--r--gtk/deprecated/gtkiconfactory.c6
-rw-r--r--gtk/deprecated/gtknumerableicon.c7
2 files changed, 7 insertions, 6 deletions
diff --git a/gtk/deprecated/gtkiconfactory.c b/gtk/deprecated/gtkiconfactory.c
index 97282a5c79..d2ada241e1 100644
--- a/gtk/deprecated/gtkiconfactory.c
+++ b/gtk/deprecated/gtkiconfactory.c
@@ -31,6 +31,7 @@
#include <string.h>
#include "gtkcssenumvalueprivate.h"
+#include "gtkcssiconthemevalueprivate.h"
#include "gtkiconfactory.h"
#include "gtkiconcache.h"
#include "gtkdebug.h"
@@ -1275,14 +1276,13 @@ render_icon_name_pixbuf (GtkIconSource *icon_source,
GdkPixbuf *pixbuf;
GdkPixbuf *tmp_pixbuf;
GtkIconSource tmp_source;
- GdkScreen *screen;
GtkIconTheme *icon_theme;
gint width, height, pixel_size;
gint *sizes, *s, dist;
GError *error = NULL;
- screen = gtk_style_context_get_screen (context);
- icon_theme = gtk_icon_theme_get_for_screen (screen);
+ icon_theme = gtk_css_icon_theme_value_get_icon_theme
+ (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_ICON_THEME));
if (!gtk_icon_size_lookup (size, &width, &height))
{
diff --git a/gtk/deprecated/gtknumerableicon.c b/gtk/deprecated/gtknumerableicon.c
index 832390cf3c..7f63f4da31 100644
--- a/gtk/deprecated/gtknumerableicon.c
+++ b/gtk/deprecated/gtknumerableicon.c
@@ -41,8 +41,10 @@
#include "gtknumerableicon.h"
#include "gtknumerableiconprivate.h"
+#include "gtkcssiconthemevalueprivate.h"
#include "gtkicontheme.h"
#include "gtkintl.h"
+#include "gtkstylepropertyprivate.h"
#include "gtkwidget.h"
#include "gtkwidgetpath.h"
#include "gtkwindow.h"
@@ -192,15 +194,14 @@ static cairo_surface_t *
draw_from_gicon (GtkNumerableIcon *self)
{
GtkIconTheme *theme;
- GdkScreen *screen;
GtkIconInfo *info;
GdkPixbuf *pixbuf;
cairo_surface_t *surface;
if (self->priv->style != NULL)
{
- screen = gtk_style_context_get_screen (self->priv->style);
- theme = gtk_icon_theme_get_for_screen (screen);
+ theme = gtk_css_icon_theme_value_get_icon_theme
+ (_gtk_style_context_peek_property (self->priv->style, GTK_CSS_PROPERTY_ICON_THEME));
}
else
{