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:
@@ -585,7 +585,7 @@ TileAtlasView::TileAtlasView() {
|
||||
|
||||
hbox = memnew(HBoxContainer);
|
||||
hbox->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
|
||||
hbox->add_theme_constant_override(SNAME("separation"), 10);
|
||||
hbox->add_theme_constant_override("separation", 10);
|
||||
hbox->hide();
|
||||
margin_container->add_child(hbox);
|
||||
|
||||
|
||||
@@ -2095,7 +2095,7 @@ TileMapEditorTilesPlugin::TileMapEditorTilesPlugin() {
|
||||
scatter_spinbox->set_max(1000);
|
||||
scatter_spinbox->set_step(0.001);
|
||||
scatter_spinbox->set_tooltip(TTR("Defines the probability of painting nothing instead of a randomly selected tile."));
|
||||
scatter_spinbox->get_line_edit()->add_theme_constant_override(SNAME("minimum_character_width"), 4);
|
||||
scatter_spinbox->get_line_edit()->add_theme_constant_override("minimum_character_width", 4);
|
||||
scatter_spinbox->connect("value_changed", callable_mp(this, &TileMapEditorTilesPlugin::_on_scattering_spinbox_changed));
|
||||
tools_settings->add_child(scatter_spinbox);
|
||||
|
||||
|
||||
@@ -609,8 +609,8 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() {
|
||||
}
|
||||
|
||||
// Theming.
|
||||
tile_data_editors_tree->add_theme_constant_override(SNAME("vseparation"), 1);
|
||||
tile_data_editors_tree->add_theme_constant_override(SNAME("hseparation"), 3);
|
||||
tile_data_editors_tree->add_theme_constant_override("vseparation", 1);
|
||||
tile_data_editors_tree->add_theme_constant_override("hseparation", 3);
|
||||
|
||||
Color group_color = get_theme_color(SNAME("prop_category"), SNAME("Editor"));
|
||||
|
||||
@@ -908,10 +908,10 @@ void TileSetAtlasSourceEditor::_update_atlas_view() {
|
||||
alternative_tiles_control->add_child(button);
|
||||
button->set_flat(true);
|
||||
button->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons")));
|
||||
button->add_theme_style_override(SNAME("normal"), memnew(StyleBoxEmpty));
|
||||
button->add_theme_style_override(SNAME("hover"), memnew(StyleBoxEmpty));
|
||||
button->add_theme_style_override(SNAME("focus"), memnew(StyleBoxEmpty));
|
||||
button->add_theme_style_override(SNAME("pressed"), memnew(StyleBoxEmpty));
|
||||
button->add_theme_style_override("normal", memnew(StyleBoxEmpty));
|
||||
button->add_theme_style_override("hover", memnew(StyleBoxEmpty));
|
||||
button->add_theme_style_override("focus", memnew(StyleBoxEmpty));
|
||||
button->add_theme_style_override("pressed", memnew(StyleBoxEmpty));
|
||||
button->connect("pressed", callable_mp(tile_set_atlas_source, &TileSetAtlasSource::create_alternative_tile), varray(tile_id, TileSetSource::INVALID_TILE_ALTERNATIVE));
|
||||
button->set_rect(Rect2(Vector2(pos.x, pos.y + (y_increment - texture_region_base_size.y) / 2.0), Vector2(texture_region_base_size_min, texture_region_base_size_min)));
|
||||
button->set_expand_icon(true);
|
||||
|
||||
Reference in New Issue
Block a user