diff options
author | Benjamin Berg <benjamin@sipsolutions.net> | 2009-02-24 13:29:01 (GMT) |
---|---|---|
committer | Benjamin Berg <benjamin@sipsolutions.net> | 2009-02-24 13:29:01 (GMT) |
commit | 607c2a9610c6bbf87b8d9c680d5737af755c3040 (patch) | |
tree | 3cb8133f55bbfa46e8e0ef8dd9a5a3a41ca8b850 /src | |
parent | a4e9c9c78eb063c5474f9365bce3aaf59381b91d (diff) |
Show/Hide the color palette correctly (#374)
Diffstat (limited to 'src')
-rw-r--r-- | src/sugar/graphics/colorbutton.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sugar/graphics/colorbutton.py b/src/sugar/graphics/colorbutton.py index 44f9f69..a5c7f0a 100644 --- a/src/sugar/graphics/colorbutton.py +++ b/src/sugar/graphics/colorbutton.py @@ -102,7 +102,12 @@ class _ColorButton(gtk.Button): def do_clicked(self): if self._palette: - self._palette.popup(immediate=True) + if not self._palette.is_up(): + self._palette.popup(immediate=True, + state=self._palette.SECONDARY) + else: + self._palette.popdown(immediate=True) + return True def set_color(self, color): assert isinstance(color, gtk.gdk.Color) |