diff options
author | Diego Escalante Urrelo <descalante@igalia.com> | 2010-08-20 14:46:27 +0800 |
---|---|---|
committer | Diego Escalante Urrelo <descalante@igalia.com> | 2010-08-22 16:34:11 +0800 |
commit | 3865f08781c9c30a2deb8dc1448d0d95923ad430 (patch) | |
tree | a9449460e2252e6cdf66250105fe74cb609df163 /lib/widgets/ephy-spinner.c | |
parent | 926686bac9724434677e5e3b9b69974bb4737761 (diff) | |
download | gsoc2013-epiphany-3865f08781c9c30a2deb8dc1448d0d95923ad430.tar gsoc2013-epiphany-3865f08781c9c30a2deb8dc1448d0d95923ad430.tar.gz gsoc2013-epiphany-3865f08781c9c30a2deb8dc1448d0d95923ad430.tar.bz2 gsoc2013-epiphany-3865f08781c9c30a2deb8dc1448d0d95923ad430.tar.lz gsoc2013-epiphany-3865f08781c9c30a2deb8dc1448d0d95923ad430.tar.xz gsoc2013-epiphany-3865f08781c9c30a2deb8dc1448d0d95923ad430.tar.zst gsoc2013-epiphany-3865f08781c9c30a2deb8dc1448d0d95923ad430.zip |
lib/widgets: use cairo for drawing widgets
Drop deprecated gdk_* drawing functions.
Bug #627450
Diffstat (limited to 'lib/widgets/ephy-spinner.c')
-rw-r--r-- | lib/widgets/ephy-spinner.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/lib/widgets/ephy-spinner.c b/lib/widgets/ephy-spinner.c index 077249443..cec0deaf4 100644 --- a/lib/widgets/ephy-spinner.c +++ b/lib/widgets/ephy-spinner.c @@ -625,8 +625,7 @@ ephy_spinner_expose (GtkWidget *widget, EphySpinnerImages *images; GtkAllocation allocation; GdkPixbuf *pixbuf; - GdkWindow *window; - GdkGC *gc; + cairo_t *cr; int x_offset, y_offset, width, height; GdkRectangle pix_area, dest; @@ -675,15 +674,12 @@ ephy_spinner_expose (GtkWidget *widget, return FALSE; } - window = gtk_widget_get_window (widget); - gc = gdk_gc_new (window); - gdk_draw_pixbuf (window, gc, pixbuf, - dest.x - x_offset - allocation.x, - dest.y - y_offset - allocation.y, - dest.x, dest.y, - dest.width, dest.height, - GDK_RGB_DITHER_MAX, 0, 0); - g_object_unref (gc); + cr = gdk_cairo_create (gtk_widget_get_window (widget)); + + gdk_cairo_set_source_pixbuf (cr, pixbuf, dest.x, dest.y); + cairo_paint (cr); + + cairo_destroy (cr); return FALSE; } |