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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user