Fix the drawing method of _IconWidget, used by IconTray

Invoker draw_rectangle() now receives a Cairo context, as can be seen in [1]

The testcase is also fixed by this commit.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>

[1] http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/blobs/master/src/sugar3/graphics/palettewindow.py#line1018
This commit is contained in:
Manuel Quiñones
2012-08-23 00:40:10 -03:00
parent 09e9373612
commit e2ddd70c13
3 changed files with 9 additions and 8 deletions
+3 -3
View File
@@ -415,13 +415,13 @@ class _IconWidget(Gtk.EventBox):
self.add(self._icon)
self._icon.show()
def do_expose_event(self, event):
def do_draw(self, cr):
palette = self.get_parent().palette
if palette and palette.is_up():
invoker = palette.props.invoker
invoker.draw_rectangle(event, palette)
invoker.draw_rectangle(cr, palette)
Gtk.EventBox.do_expose_event(self, event)
Gtk.EventBox.do_draw(self, cr)
def get_icon(self):
return self._icon