summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-07-11 22:00:07 (GMT)
committerBenjamin Otte <otte@redhat.com>2010-08-07 00:39:21 (GMT)
commit92055d8d328a7adaa05f3c6ac6d1c496819940ec (patch)
tree281972082dd1a243de158fe9876bc9459e183186
parent568865ab1bad711ccd331561aa950c5862e112cb (diff)
downloadgtk+-92055d8d328a7adaa05f3c6ac6d1c496819940ec.zip
gtk+-92055d8d328a7adaa05f3c6ac6d1c496819940ec.tar.xz
entry: replace gdk_draw_pixbuf() call with Cairo version
-rw-r--r--gtk/gtkentry.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 4eae62c..0ca94bb 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -3208,6 +3208,7 @@ draw_icon (GtkWidget *widget,
EntryIconInfo *icon_info = priv->icons[icon_pos];
GdkPixbuf *pixbuf;
gint x, y, width, height;
+ cairo_t *cr;
if (!icon_info)
return;
@@ -3265,9 +3266,10 @@ draw_icon (GtkWidget *widget,
pixbuf = temp_pixbuf;
}
- gdk_draw_pixbuf (icon_info->window, widget->style->black_gc, pixbuf,
- 0, 0, x, y, -1, -1,
- GDK_RGB_DITHER_NORMAL, 0, 0);
+ cr = gdk_cairo_create (icon_info->window);
+ gdk_cairo_set_source_pixbuf (cr, pixbuf, x, y);
+ cairo_paint (cr);
+ cairo_destroy (cr);
g_object_unref (pixbuf);
}