Commit b75972d0 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos Committed by Carlos Garnacho

GtkStyle: set style context state before calling gtk_render_icon_pixbuf()

parent ca59b042
......@@ -1693,6 +1693,7 @@ gtk_default_render_icon (GtkStyle *style,
{
GtkStyleContext *context;
GtkStylePrivate *priv;
GtkStateFlags flags = 0;
GdkPixbuf *pixbuf;
if (widget)
......@@ -1711,6 +1712,20 @@ gtk_default_render_icon (GtkStyle *style,
if (detail)
transform_detail_string (detail, context);
switch (state)
{
case GTK_STATE_PRELIGHT:
flags |= GTK_STATE_FLAG_PRELIGHT;
break;
case GTK_STATE_INSENSITIVE:
flags |= GTK_STATE_FLAG_INSENSITIVE;
break;
default:
break;
}
gtk_style_context_set_state (context, flags);
pixbuf = gtk_render_icon_pixbuf (context, source, size);
gtk_style_context_restore (context);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment