diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-06-19 23:09:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-19 23:09:49 +0200 |
commit | 6d8c14f849376905e1577f9fc3f9512bcffb1e3c (patch) | |
tree | 1c0de1bac35046915575687e8d8993643d372474 /scene/gui/graph_edit.cpp | |
parent | cb9d02a8d1b5bb71abcec6be0e75002c5ea656c4 (diff) | |
parent | 31b7f02a29cdf4f1c30cfc37962f43f67380b9ad (diff) |
Merge pull request #39690 from Calinou/remove-toolbutton
Remove ToolButton in favor of Button
Diffstat (limited to 'scene/gui/graph_edit.cpp')
-rw-r--r-- | scene/gui/graph_edit.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index 5080ba74e2..2b0e084db4 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -33,6 +33,7 @@ #include "core/input/input.h" #include "core/os/keyboard.h" #include "scene/gui/box_container.h" +#include "scene/gui/button.h" #ifdef TOOLS_ENABLED #include "editor/editor_scale.h" @@ -1310,25 +1311,29 @@ GraphEdit::GraphEdit() { top_layer->add_child(zoom_hb); zoom_hb->set_position(Vector2(10, 10)); - zoom_minus = memnew(ToolButton); + zoom_minus = memnew(Button); + zoom_minus->set_flat(true); zoom_hb->add_child(zoom_minus); zoom_minus->set_tooltip(RTR("Zoom Out")); zoom_minus->connect("pressed", callable_mp(this, &GraphEdit::_zoom_minus)); zoom_minus->set_focus_mode(FOCUS_NONE); - zoom_reset = memnew(ToolButton); + zoom_reset = memnew(Button); + zoom_reset->set_flat(true); zoom_hb->add_child(zoom_reset); zoom_reset->set_tooltip(RTR("Zoom Reset")); zoom_reset->connect("pressed", callable_mp(this, &GraphEdit::_zoom_reset)); zoom_reset->set_focus_mode(FOCUS_NONE); - zoom_plus = memnew(ToolButton); + zoom_plus = memnew(Button); + zoom_plus->set_flat(true); zoom_hb->add_child(zoom_plus); zoom_plus->set_tooltip(RTR("Zoom In")); zoom_plus->connect("pressed", callable_mp(this, &GraphEdit::_zoom_plus)); zoom_plus->set_focus_mode(FOCUS_NONE); - snap_button = memnew(ToolButton); + snap_button = memnew(Button); + snap_button->set_flat(true); snap_button->set_toggle_mode(true); snap_button->set_tooltip(RTR("Enable snap and show grid.")); snap_button->connect("pressed", callable_mp(this, &GraphEdit::_snap_toggled)); |