Remove ToolButton in favor of Button

ToolButton has no redeeming differences with Button;
it's just a Button with the Flat property enabled by default.
Removing it avoids some confusion when creating GUIs.

Existing ToolButtons will be converted to Buttons, but the Flat
property won't be enabled automatically.

This closes https://github.com/godotengine/godot-proposals/issues/1081.
This commit is contained in:
Hugo Locurcio 2020-06-19 20:49:04 +02:00
parent cb9d02a8d1
commit 31b7f02a29
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
103 changed files with 616 additions and 590 deletions

View file

@ -220,12 +220,14 @@ AudioStreamEditor::AudioStreamEditor() {
hbox->add_theme_constant_override("separation", 0);
vbox->add_child(hbox);
_play_button = memnew(ToolButton);
_play_button = memnew(Button);
_play_button->set_flat(true);
hbox->add_child(_play_button);
_play_button->set_focus_mode(Control::FOCUS_NONE);
_play_button->connect("pressed", callable_mp(this, &AudioStreamEditor::_play));
_stop_button = memnew(ToolButton);
_stop_button = memnew(Button);
_stop_button->set_flat(true);
hbox->add_child(_stop_button);
_stop_button->set_focus_mode(Control::FOCUS_NONE);
_stop_button->connect("pressed", callable_mp(this, &AudioStreamEditor::_stop));