diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-06-19 20:49:04 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-06-19 20:49:49 +0200 |
commit | 31b7f02a29cdf4f1c30cfc37962f43f67380b9ad (patch) | |
tree | 1c0de1bac35046915575687e8d8993643d372474 /editor/editor_audio_buses.cpp | |
parent | cb9d02a8d1b5bb71abcec6be0e75002c5ea656c4 (diff) | |
download | redot-engine-31b7f02a29cdf4f1c30cfc37962f43f67380b9ad.tar.gz |
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.
Diffstat (limited to 'editor/editor_audio_buses.cpp')
-rw-r--r-- | editor/editor_audio_buses.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 5cf5201b18..10825973ae 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -782,19 +782,22 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) { HBoxContainer *hbc = memnew(HBoxContainer); vb->add_child(hbc); - solo = memnew(ToolButton); + solo = memnew(Button); + solo->set_flat(true); solo->set_toggle_mode(true); solo->set_tooltip(TTR("Solo")); solo->set_focus_mode(FOCUS_NONE); solo->connect("pressed", callable_mp(this, &EditorAudioBus::_solo_toggled)); hbc->add_child(solo); - mute = memnew(ToolButton); + mute = memnew(Button); + mute->set_flat(true); mute->set_toggle_mode(true); mute->set_tooltip(TTR("Mute")); mute->set_focus_mode(FOCUS_NONE); mute->connect("pressed", callable_mp(this, &EditorAudioBus::_mute_toggled)); hbc->add_child(mute); - bypass = memnew(ToolButton); + bypass = memnew(Button); + bypass->set_flat(true); bypass->set_toggle_mode(true); bypass->set_tooltip(TTR("Bypass")); bypass->set_focus_mode(FOCUS_NONE); |