Revert "Add missing SNAME macro optimization to all theme methods call"

This reverts commit a988fad9a0.

As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.
This commit is contained in:
Rémi Verschelde
2022-02-08 10:14:58 +01:00
parent 0154ce2c8d
commit fc076ece3d
90 changed files with 1648 additions and 1648 deletions

View File

@ -448,7 +448,7 @@ GroupDialog::GroupDialog() {
groups->set_allow_reselect(true);
groups->set_allow_rmb_select(true);
groups->set_v_size_flags(Control::SIZE_EXPAND_FILL);
groups->add_theme_constant_override(SNAME("draw_guides"), 1);
groups->add_theme_constant_override("draw_guides", 1);
groups->connect("item_selected", callable_mp(this, &GroupDialog::_group_selected));
groups->connect("button_pressed", callable_mp(this, &GroupDialog::_modify_group_pressed));
groups->connect("item_edited", callable_mp(this, &GroupDialog::_group_renamed));
@ -484,10 +484,10 @@ GroupDialog::GroupDialog() {
nodes_to_add->set_hide_folding(true);
nodes_to_add->set_select_mode(Tree::SELECT_MULTI);
nodes_to_add->set_v_size_flags(Control::SIZE_EXPAND_FILL);
nodes_to_add->add_theme_constant_override(SNAME("draw_guides"), 1);
nodes_to_add->add_theme_constant_override("draw_guides", 1);
HBoxContainer *add_filter_hbc = memnew(HBoxContainer);
add_filter_hbc->add_theme_constant_override(SNAME("separate"), 0);
add_filter_hbc->add_theme_constant_override("separate", 0);
vbc_add->add_child(add_filter_hbc);
add_filter = memnew(LineEdit);
@ -534,10 +534,10 @@ GroupDialog::GroupDialog() {
nodes_to_remove->set_hide_root(true);
nodes_to_remove->set_hide_folding(true);
nodes_to_remove->set_select_mode(Tree::SELECT_MULTI);
nodes_to_remove->add_theme_constant_override(SNAME("draw_guides"), 1);
nodes_to_remove->add_theme_constant_override("draw_guides", 1);
HBoxContainer *remove_filter_hbc = memnew(HBoxContainer);
remove_filter_hbc->add_theme_constant_override(SNAME("separate"), 0);
remove_filter_hbc->add_theme_constant_override("separate", 0);
vbc_remove->add_child(remove_filter_hbc);
remove_filter = memnew(LineEdit);
@ -733,8 +733,8 @@ GroupsEditor::GroupsEditor() {
tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
vbc->add_child(tree);
tree->connect("button_pressed", callable_mp(this, &GroupsEditor::_modify_group));
tree->add_theme_constant_override(SNAME("draw_guides"), 1);
add_theme_constant_override(SNAME("separation"), 3 * EDSCALE);
tree->add_theme_constant_override("draw_guides", 1);
add_theme_constant_override("separation", 3 * EDSCALE);
_group_name_changed("");
}