Ticket #4089: theme_tray_icon.patch

File theme_tray_icon.patch, 895 bytes (added by erikos, 11 years ago)

First patch based on the toolbutton code

  • src/sugar3/graphics/tray.py

    diff --git a/src/sugar3/graphics/tray.py b/src/sugar3/graphics/tray.py
    index 82e1d97..3c54aca 100644
    a b class _IconWidget(Gtk.EventBox): 
    417417
    418418    def do_draw(self, cr):
    419419        palette = self.get_parent().palette
     420
     421        if palette and palette.is_up():
     422            allocation = self.get_allocation()
     423            # draw a black background, has been done by the engine before
     424            cr.set_source_rgb(0, 0, 0)
     425            cr.rectangle(0, 0, allocation.width, allocation.height)
     426            cr.paint()
     427
     428        Gtk.EventBox.do_draw(self, cr)
     429
    420430        if palette and palette.is_up():
    421431            invoker = palette.props.invoker
    422432            invoker.draw_rectangle(cr, palette)
    423433
    424         Gtk.EventBox.do_draw(self, cr)
     434        return False
    425435
    426436    def get_icon(self):
    427437        return self._icon