CellRendererIcon: clipping rectangle not applied, SL #3872

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 <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
This commit is contained in:
Simon Schampijer 2012-09-11 16:00:42 +02:00
parent c0756f48d4
commit c6c2220f0d

View File

@ -856,6 +856,7 @@ class CellRendererIcon(Gtk.CellRenderer):
cr.set_source_surface(surface, math.floor(x), math.floor(y)) cr.set_source_surface(surface, math.floor(x), math.floor(y))
cr.rectangle(cell_area.x, cell_area.y, cell_area.width, cr.rectangle(cell_area.x, cell_area.y, cell_area.width,
cell_area.height) cell_area.height)
cr.clip()
cr.paint() cr.paint()