From e0c2017c50f9099041352e63e5355c9b1196aed2 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Fri, 5 Dec 2008 18:02:13 +0100 Subject: [PATCH] Add colors to icons in menu items --- src/sugar/graphics/menuitem.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sugar/graphics/menuitem.py b/src/sugar/graphics/menuitem.py index fc77ba05..954df1bc 100644 --- a/src/sugar/graphics/menuitem.py +++ b/src/sugar/graphics/menuitem.py @@ -28,7 +28,8 @@ import gtk from sugar.graphics.icon import Icon class MenuItem(gtk.ImageMenuItem): - def __init__(self, text_label=None, icon_name=None, text_maxlen=0): + def __init__(self, text_label=None, icon_name=None, text_maxlen=0, + xo_color=None): gobject.GObject.__init__(self) self._accelerator = None @@ -43,6 +44,8 @@ class MenuItem(gtk.ImageMenuItem): if icon_name: icon = Icon(icon_name=icon_name, icon_size=gtk.ICON_SIZE_MENU) + if xo_color is not None: + icon.props.xo_color = xo_color self.set_image(icon) icon.show()