diff options
Diffstat (limited to 'sugar/graphics/iconbutton.py')
-rw-r--r-- | sugar/graphics/iconbutton.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sugar/graphics/iconbutton.py b/sugar/graphics/iconbutton.py index c2a1046..b1992a6 100644 --- a/sugar/graphics/iconbutton.py +++ b/sugar/graphics/iconbutton.py @@ -39,19 +39,19 @@ class IconButton(CanvasIcon): gobject.PARAM_READWRITE) } - def __init__(self, icon_name, color=None): - if color: - self._normal_color = color + def __init__(self, **kwargs): + self._active = True + + CanvasIcon.__init__(self, cache=True, **kwargs) + + if self.props.color: + self._normal_color = self.props.color else: self._normal_color = IconColor('white') + self.props.color = self._normal_color self._prelight_color = profile.get_color() self._inactive_color = IconColor('#808080,#424242') - self._active = True - - CanvasIcon.__init__(self, icon_name=icon_name, cache=True, - color=self._normal_color) - self._set_size(STANDARD_SIZE) self.connect('button-press-event', self._button_press_event_cb) |