[gtk+/treeview-refactor] Clip focus rectangle to background area



commit e3cab18354724fee8ca5673d8996218771498bf9
Author: Kristian Rietveld <kris gtk org>
Date:   Thu Dec 16 12:33:00 2010 +0100

    Clip focus rectangle to background area

 gtk/gtkcellarea.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcellarea.c b/gtk/gtkcellarea.c
index 1019021..a11f5b0 100644
--- a/gtk/gtkcellarea.c
+++ b/gtk/gtkcellarea.c
@@ -1135,11 +1135,18 @@ gtk_cell_area_real_render (GtkCellArea          *area,
 	(flags & GTK_CELL_RENDERER_PRELIT ? GTK_STATE_PRELIGHT :
 	 (flags & GTK_CELL_RENDERER_INSENSITIVE ? GTK_STATE_INSENSITIVE : GTK_STATE_NORMAL));
 
+      cairo_save (cr);
+
+      gdk_cairo_rectangle (cr, background_area);
+      cairo_clip (cr);
+
       gtk_paint_focus (gtk_widget_get_style (widget), cr, 
 		       renderer_state, widget,
 		       gtk_cell_area_get_style_detail (area),
 		       render_data.focus_rect.x,     render_data.focus_rect.y,
 		       render_data.focus_rect.width, render_data.focus_rect.height);
+
+      cairo_restore (cr);
     }
 }
 



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