ToggleToolbutton: do hide the tooltip when clicked or touched
This is the same behaviour as for the RadioToolButton and the
ToolButton. See 5a1b380dd6
where
we did the same for the RadioToolbutton.
Updated the toolbuttons.py test to be able to test that code
path.
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
This commit is contained in:
parent
b9234202ab
commit
63b8e87b1a
@ -141,4 +141,8 @@ class ToggleToolButton(Gtk.ToggleToolButton):
|
|||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def do_clicked(self):
|
||||||
|
if self.palette:
|
||||||
|
self.palette.popdown(True)
|
||||||
|
|
||||||
palette = property(get_palette, set_palette)
|
palette = property(get_palette, set_palette)
|
||||||
|
@ -37,6 +37,7 @@ toolbar_box.toolbar.insert(color_button, -1)
|
|||||||
color_button.show()
|
color_button.show()
|
||||||
|
|
||||||
favorite_button = ToggleToolButton('emblem-favorite')
|
favorite_button = ToggleToolButton('emblem-favorite')
|
||||||
|
favorite_button.set_tooltip('Favorite')
|
||||||
toolbar_box.toolbar.insert(favorite_button, -1)
|
toolbar_box.toolbar.insert(favorite_button, -1)
|
||||||
favorite_button.show()
|
favorite_button.show()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user