[Bugs] #3872 sugar-toolkit-gtk3 UNSP: CellRendererIcon has a bad clipping rectangle
Sugar Labs Bugs
bugtracker-noreply at sugarlabs.org
Sun Sep 9 10:18:14 EDT 2012
#3872: CellRendererIcon has a bad clipping rectangle
------------------------------------------+---------------------------------
Reporter: manuq | Owner: manuq
Type: defect | Status: new
Priority: Unspecified by Maintainer | Milestone: 0.98
Component: sugar-toolkit-gtk3 | Version: Git as of bugdate
Severity: Blocker | Keywords:
Distribution: Unspecified | Status_field: Assigned
------------------------------------------+---------------------------------
Changes (by erikos):
* severity: Unspecified => Blocker
* status_field: Unconfirmed => Assigned
Comment:
I just had a look at
[http://git.gnome.org/browse/gtk+/tree/gtk/gtkcellrenderer.c#n731
gtk_cell_renderer_render] in GTK+, and they seem to use the background
area for the clipping.
{{{
diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
index f3bcb06..aa149a0 100644
--- a/src/sugar3/graphics/icon.py
+++ b/src/sugar3/graphics/icon.py
@@ -854,8 +854,9 @@ class CellRendererIcon(Gtk.CellRenderer):
y = cell_area.y + yoffset
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.rectangle(background_area.x, background_area.y,
background_area.width,
+ background_area.height)
+ cr.clip()
cr.paint()
}}}
This seems to work, but we should probably look a bit more closely.
--
Ticket URL: <http://bugs.sugarlabs.org/ticket/3872#comment:1>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system
More information about the Bugs
mailing list