[gimp] app: port a gdk_draw_rectangle() in GimpComboTagEntry to cairo



commit 3b0c4e2e5e739cac21ae611e3af988540b6d8df7
Author: Michael Natterer <mitch gimp org>
Date:   Fri Sep 10 13:47:04 2010 +0200

    app: port a gdk_draw_rectangle() in GimpComboTagEntry to cairo

 app/widgets/gimpcombotagentry.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/app/widgets/gimpcombotagentry.c b/app/widgets/gimpcombotagentry.c
index a737846..771ec60 100644
--- a/app/widgets/gimpcombotagentry.c
+++ b/app/widgets/gimpcombotagentry.c
@@ -162,13 +162,16 @@ gimp_combo_tag_entry_expose (GtkWidget      *widget,
 
   if (! entry->arrow_pixbuf)
     {
-      GtkStyle  *style  = gtk_widget_get_style (widget);
-      GdkPixmap *pixmap = gdk_pixmap_new (gtk_widget_get_window (widget),
-                                          8, 8, -1);
+      GtkStyle  *style = gtk_widget_get_style (widget);
+      GdkPixmap *pixmap;
+      cairo_t   *cr;
 
-      gdk_draw_rectangle (pixmap,
-                          style->base_gc[GTK_STATE_NORMAL],
-                          TRUE, 0, 0, 8, 8);
+      pixmap = gdk_pixmap_new (gtk_widget_get_window (widget), 8, 8, -1);
+
+      cr = gdk_cairo_create (pixmap);
+      gdk_cairo_set_source_color (cr, &style->base[GTK_STATE_NORMAL]);
+      cairo_paint (cr);
+      cairo_destroy (cr);
 
       gtk_paint_arrow (style, pixmap,
                        GTK_STATE_NORMAL,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]