Show/Hide the color palette correctly (#374)
This commit is contained in:
parent
a4e9c9c78e
commit
607c2a9610
@ -102,7 +102,12 @@ class _ColorButton(gtk.Button):
|
|||||||
|
|
||||||
def do_clicked(self):
|
def do_clicked(self):
|
||||||
if self._palette:
|
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):
|
def set_color(self, color):
|
||||||
assert isinstance(color, gtk.gdk.Color)
|
assert isinstance(color, gtk.gdk.Color)
|
||||||
|
Loading…
Reference in New Issue
Block a user