Enable toggle behaviour for buttons that trigger popups
This commit is contained in:
parent
37e198c320
commit
8f9447310d
5 changed files with 20 additions and 2 deletions
|
|
@ -813,6 +813,8 @@ void ColorPickerButton::_update_picker() {
|
|||
add_child(popup);
|
||||
picker->connect("color_changed", this, "_color_changed");
|
||||
popup->connect("modal_closed", this, "_modal_closed");
|
||||
popup->connect("about_to_show", this, "set_pressed", varray(true));
|
||||
popup->connect("popup_hide", this, "set_pressed", varray(false));
|
||||
picker->set_pick_color(color);
|
||||
picker->set_edit_alpha(edit_alpha);
|
||||
}
|
||||
|
|
@ -843,4 +845,6 @@ ColorPickerButton::ColorPickerButton() {
|
|||
picker = NULL;
|
||||
popup = NULL;
|
||||
edit_alpha = true;
|
||||
|
||||
set_toggle_mode(true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue