Merge pull request #22301 from YeldhamDev/button_popup_highlight

Enable toggle behaviour for buttons that trigger popups
This commit is contained in:
Rémi Verschelde
2019-04-25 17:47:23 +02:00
committed by GitHub
5 changed files with 19 additions and 2 deletions

View File

@ -825,6 +825,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);
}
@ -855,4 +857,6 @@ ColorPickerButton::ColorPickerButton() {
picker = NULL;
popup = NULL;
edit_alpha = true;
set_toggle_mode(true);
}