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/project_settings_editor.cpp | |
parent | cb9d02a8d1b5bb71abcec6be0e75002c5ea656c4 (diff) |
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/project_settings_editor.cpp')
-rw-r--r-- | editor/project_settings_editor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index a7c260c0f8..f2c4a533ea 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -1872,7 +1872,8 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { restart_button->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_editor_restart)); restart_hb->add_child(restart_button); restart_button->set_text(TTR("Save & Restart")); - restart_close_button = memnew(ToolButton); + restart_close_button = memnew(Button); + restart_close_button->set_flat(true); restart_close_button->connect("pressed", callable_mp(this, &ProjectSettingsEditor::_editor_restart_close)); restart_hb->add_child(restart_close_button); restart_container->hide(); |