[Bugs] #3872 sugar-toolkit-gtk3 UNSP: CellRendererIcon has a bad clipping rectangle

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Tue Sep 11 09:52:28 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         
------------------------------------------+---------------------------------

Comment(by manuq):

 Just adding the clip call makes it work:

 {{{
 diff --git a/src/sugar3/graphics/icon.py b/src/sugar3/graphics/icon.py
 index f3bcb06..9008f3f 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()
 }}}

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/3872#comment:2>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list