From c6c2220f0ded037dfcaab7343a74b4ff5f5790d0 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Tue, 11 Sep 2012 16:00:42 +0200 Subject: [PATCH] CellRendererIcon: clipping rectangle not applied, SL #3872 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We do not apply the clipping rectangle in do_render, we need to call clip on the cairo_t as well. This solves the issue in the Journal and in the Activity List View where the icons do only appear on hovering over them. See gtk_cell_renderer_render [1] for background information. [1] http://git.gnome.org/browse/gtk+/tree/gtk/gtkcellrenderer.c#n731 Signed-off-by: Simon Schampijer Acked-by: Manuel QuiƱones --- src/sugar3/graphics/icon.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py index f3bcb061..9008f3fb 100644 --- a/src/sugar3/graphics/icon.py +++ b/src/sugar3/graphics/icon.py @@ -856,6 +856,7 @@ class CellRendererIcon(Gtk.CellRenderer): cr.set_source_surface(surface, math.floor(x), math.floor(y)) cr.rectangle(cell_area.x, cell_area.y, cell_area.width, cell_area.height) + cr.clip() cr.paint()