diff options
author | jmb462 <jmb462@gmail.com> | 2022-02-06 20:17:35 +0100 |
---|---|---|
committer | jmb462 <jmb462@gmail.com> | 2022-02-06 23:06:11 +0100 |
commit | a988fad9a092053434545c32afae91ccbdfbe792 (patch) | |
tree | 90b0666a880ef744364d65102195561dd93a56bc /editor/plugins/tiles | |
parent | 95719930a8940d4737d512d75004e8b5cd50e825 (diff) |
Add missing SNAME macro optimization to all theme methods call
Diffstat (limited to 'editor/plugins/tiles')
-rw-r--r-- | editor/plugins/tiles/tile_atlas_view.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/tiles/tile_map_editor.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/tiles/tile_set_atlas_source_editor.cpp | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/editor/plugins/tiles/tile_atlas_view.cpp b/editor/plugins/tiles/tile_atlas_view.cpp index 35496795e0..ebece8ef40 100644 --- a/editor/plugins/tiles/tile_atlas_view.cpp +++ b/editor/plugins/tiles/tile_atlas_view.cpp @@ -585,7 +585,7 @@ TileAtlasView::TileAtlasView() { hbox = memnew(HBoxContainer); hbox->set_mouse_filter(Control::MOUSE_FILTER_IGNORE); - hbox->add_theme_constant_override("separation", 10); + hbox->add_theme_constant_override(SNAME("separation"), 10); hbox->hide(); margin_container->add_child(hbox); diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp index 6e3724ead9..621cdae927 100644 --- a/editor/plugins/tiles/tile_map_editor.cpp +++ b/editor/plugins/tiles/tile_map_editor.cpp @@ -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("minimum_character_width", 4); + scatter_spinbox->get_line_edit()->add_theme_constant_override(SNAME("minimum_character_width"), 4); scatter_spinbox->connect("value_changed", callable_mp(this, &TileMapEditorTilesPlugin::_on_scattering_spinbox_changed)); tools_settings->add_child(scatter_spinbox); diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp index 1bd1cd0219..7e05001b57 100644 --- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp +++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp @@ -609,8 +609,8 @@ void TileSetAtlasSourceEditor::_update_tile_data_editors() { } // Theming. - tile_data_editors_tree->add_theme_constant_override("vseparation", 1); - tile_data_editors_tree->add_theme_constant_override("hseparation", 3); + tile_data_editors_tree->add_theme_constant_override(SNAME("vseparation"), 1); + tile_data_editors_tree->add_theme_constant_override(SNAME("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("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->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->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); |