[gtk+/rendering-cleanup: 48/113] progressbar: Use cairo instead of gdk_draw_drawable()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup: 48/113] progressbar: Use cairo instead of gdk_draw_drawable()
- Date: Wed, 21 Jul 2010 23:25:21 +0000 (UTC)
commit 0b0f3e82eb432608365852e82c5472622ca6324d
Author: Benjamin Otte <otte redhat com>
Date: Wed Jul 14 18:28:49 2010 +0200
progressbar: Use cairo instead of gdk_draw_drawable()
gtk/gtkprogressbar.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c
index 500f2d1..3988970 100644
--- a/gtk/gtkprogressbar.c
+++ b/gtk/gtkprogressbar.c
@@ -471,16 +471,16 @@ gtk_progress_bar_expose (GtkWidget *widget,
if (gtk_widget_is_drawable (widget))
{
+ cairo_t *cr;
+
if (pbar->dirty)
gtk_progress_bar_paint (pbar);
- gdk_draw_drawable (widget->window,
- widget->style->black_gc,
- pbar->offscreen_pixmap,
- event->area.x, event->area.y,
- event->area.x, event->area.y,
- event->area.width,
- event->area.height);
+ cr = gdk_cairo_create (widget->window);
+ gdk_cairo_set_source_pixmap (cr, pbar->offscreen_pixmap, 0, 0);
+ gdk_cairo_rectangle (cr, &event->area);
+ cairo_paint (cr);
+ cairo_destroy (cr);
}
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]