Skip to content

Commit

Permalink
Merge pull request #85236 from YuriSizov/editor-flat-remote
Browse files Browse the repository at this point in the history
Use the flat button style on switches in scene and node docks
  • Loading branch information
YuriSizov committed Dec 8, 2023
2 parents abddb93 + b1d6e33 commit 8cb2d20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions editor/node_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ NodeDock::NodeDock() {
mode_hb->hide();

connections_button = memnew(Button);
connections_button->set_flat(true);
connections_button->set_theme_type_variation("FlatButton");
connections_button->set_text(TTR("Signals"));
connections_button->set_toggle_mode(true);
connections_button->set_pressed(true);
Expand All @@ -114,7 +114,7 @@ NodeDock::NodeDock() {
connections_button->connect("pressed", callable_mp(this, &NodeDock::show_connections));

groups_button = memnew(Button);
groups_button->set_flat(true);
groups_button->set_theme_type_variation("FlatButton");
groups_button->set_text(TTR("Groups"));
groups_button->set_toggle_mode(true);
groups_button->set_pressed(false);
Expand Down
8 changes: 4 additions & 4 deletions editor/scene_tree_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4039,21 +4039,21 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
vbc->add_child(button_hb);

edit_remote = memnew(Button);
edit_remote->set_flat(true);
button_hb->add_child(edit_remote);
edit_remote->set_theme_type_variation("FlatButton");
edit_remote->set_h_size_flags(SIZE_EXPAND_FILL);
edit_remote->set_text(TTR("Remote"));
edit_remote->set_toggle_mode(true);
edit_remote->set_tooltip_text(TTR("If selected, the Remote scene tree dock will cause the project to stutter every time it updates.\nSwitch back to the Local scene tree dock to improve performance."));
button_hb->add_child(edit_remote);
edit_remote->connect("pressed", callable_mp(this, &SceneTreeDock::_remote_tree_selected));

edit_local = memnew(Button);
edit_local->set_flat(true);
button_hb->add_child(edit_local);
edit_local->set_theme_type_variation("FlatButton");
edit_local->set_h_size_flags(SIZE_EXPAND_FILL);
edit_local->set_text(TTR("Local"));
edit_local->set_toggle_mode(true);
edit_local->set_pressed(true);
button_hb->add_child(edit_local);
edit_local->connect("pressed", callable_mp(this, &SceneTreeDock::_local_tree_selected));

remote_tree = nullptr;
Expand Down

0 comments on commit 8cb2d20

Please sign in to comment.