aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/text
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-10-21 16:26:17 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-30 01:50:04 +0800
commit7d2fc0cf9e3de969d8b753e693078f45069a658d (patch)
tree5cf652cc10f80ab608ed89943a5d9c3053c0d293 /widgets/text
parenteaf4b5a865865de7b98621a5285e16ae4dea2a61 (diff)
downloadgsoc2013-evolution-7d2fc0cf9e3de969d8b753e693078f45069a658d.tar.gz
gsoc2013-evolution-7d2fc0cf9e3de969d8b753e693078f45069a658d.tar.zst
gsoc2013-evolution-7d2fc0cf9e3de969d8b753e693078f45069a658d.zip
e-text: Draw EReflow with cairo
Diffstat (limited to 'widgets/text')
-rw-r--r--widgets/text/e-reflow.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/widgets/text/e-reflow.c b/widgets/text/e-reflow.c
index 88e3a89a8b..bb8691c80b 100644
--- a/widgets/text/e-reflow.c
+++ b/widgets/text/e-reflow.c
@@ -1183,6 +1183,9 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
EReflow *reflow = E_REFLOW (item);
gint i;
gdouble column_width;
+ cairo_t *cr;
+
+ cr = gdk_cairo_create (drawable);
if (GNOME_CANVAS_ITEM_CLASS (e_reflow_parent_class)->draw)
GNOME_CANVAS_ITEM_CLASS (e_reflow_parent_class)->draw (item, drawable, x, y, width, height);
@@ -1241,20 +1244,23 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
i /= column_width + E_REFLOW_FULL_GUTTER;
running_width += i * (column_width + E_REFLOW_FULL_GUTTER);
+ gdk_cairo_set_source_color (cr, &style->fg[GTK_STATE_NORMAL]);
+
for (; i < reflow->column_count; i++) {
if (running_width > x + width)
break;
x_rect = running_width;
- gdk_draw_rectangle (drawable,
- style->fg_gc[GTK_STATE_NORMAL],
- TRUE,
- x_rect - x,
- y_rect - y,
- width_rect - 1,
- height_rect - 1);
+ cairo_rectangle (cr,
+ x_rect - x,
+ y_rect - y,
+ width_rect - 1,
+ height_rect - 1);
+ cairo_fill (cr);
running_width += E_REFLOW_DIVIDER_WIDTH + E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH;
}
}
+
+ cairo_destroy (cr);
}
static void