[gtk+] treeview: Draw the dnd pixmaps with Cairo
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] treeview: Draw the dnd pixmaps with Cairo
- Date: Mon, 26 Jul 2010 14:52:15 +0000 (UTC)
commit 5cd6d309ead35b127d7815322129613003a02dcf
Author: Benjamin Otte <otte redhat com>
Date: Thu Jul 15 05:18:33 2010 +0200
treeview: Draw the dnd pixmaps with Cairo
gtk/gtktreeview.c | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 753b208..955558b 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -13721,6 +13721,7 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
gint bin_window_width;
gboolean is_separator = FALSE;
gboolean rtl;
+ cairo_t *cr;
g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), NULL);
g_return_val_if_fail (path != NULL, NULL);
@@ -13765,12 +13766,9 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
expose_area.width = bin_window_width + 2;
expose_area.height = background_area.height + 2;
- gdk_draw_rectangle (drawable,
- widget->style->base_gc [gtk_widget_get_state (widget)],
- TRUE,
- 0, 0,
- bin_window_width + 2,
- background_area.height + 2);
+ cr = gdk_cairo_create (drawable);
+ gdk_cairo_set_source_color (cr, &widget->style->base [gtk_widget_get_state (widget)]);
+ cairo_paint (cr);
rtl = gtk_widget_get_direction (GTK_WIDGET (tree_view)) == GTK_TEXT_DIR_RTL;
@@ -13838,12 +13836,15 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView *tree_view,
cell_offset += column->width;
}
- gdk_draw_rectangle (drawable,
- widget->style->black_gc,
- FALSE,
- 0, 0,
- bin_window_width + 1,
- background_area.height + 1);
+ cairo_set_source_rgb (cr, 0, 0, 0);
+ cairo_rectangle (cr,
+ 0.5, 0.5,
+ bin_window_width + 1,
+ background_area.height + 1);
+ cairo_set_line_width (cr, 1.0);
+ cairo_stroke (cr);
+
+ cairo_destroy (cr);
return drawable;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]