[evolution/rendering-cleanup: 95/97] e-table: Draw ECellTree with cairo
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/rendering-cleanup: 95/97] e-table: Draw ECellTree with cairo
- Date: Thu, 21 Oct 2010 09:52:01 +0000 (UTC)
commit 046f7905b0cdf6bf02fcf048d3a3effccf9bdeec
Author: Benjamin Otte <otte redhat com>
Date: Thu Oct 21 11:30:20 2010 +0200
e-table: Draw ECellTree with cairo
widgets/table/e-cell-tree.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c
index d8341b7..e0de5e0 100644
--- a/widgets/table/e-cell-tree.c
+++ b/widgets/table/e-cell-tree.c
@@ -221,9 +221,11 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
GtkWidget *canvas = GTK_WIDGET (tree_view->canvas);
GtkStyle *style;
gboolean selected;
-
+ cairo_t *cr;
gint offset, subcell_offset;
+ cr = gdk_cairo_create (drawable);
+
style = gtk_widget_get_style (canvas);
selected = flags & E_CELL_SELECTED;
@@ -269,15 +271,11 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
}
if (node_image) {
- gdk_draw_pixbuf (drawable,
- NULL,
- node_image,
- 0, 0,
- x1 + subcell_offset,
- y1 + (y2 - y1) / 2 - node_image_height / 2,
- node_image_width, node_image_height,
- GDK_RGB_DITHER_NORMAL,
- node_image_width, 0);
+ gdk_cairo_set_source_pixbuf (cr, node_image,
+ x1 + subcell_offset,
+ y1 + (y2 - y1) / 2 - node_image_height / 2);
+ cairo_paint (cr);
+
subcell_offset += node_image_width;
}
}
@@ -287,6 +285,8 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
e_cell_draw (tree_view->subcell_view, drawable,
model_col, view_col, row, flags,
x1 + subcell_offset, y1, x2, y2);
+
+ cairo_destroy (cr);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]