From b1d6e336eaaa47cf2740199d886560ff12070244 Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Wed, 22 Nov 2023 19:36:03 +0100 Subject: [PATCH] Use the flat button style on switches in scene and node docks --- editor/node_dock.cpp | 4 ++-- editor/scene_tree_dock.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/editor/node_dock.cpp b/editor/node_dock.cpp index 65217304734e..680e77fe4269 100644 --- a/editor/node_dock.cpp +++ b/editor/node_dock.cpp @@ -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); @@ -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); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index a94c978a1ae8..11c904f8f7fe 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -4031,21 +4031,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;