diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-02-08 10:14:58 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-02-08 10:17:25 +0100 |
commit | fc076ece3ddecd44a62dc0febed7baee47f2eede (patch) | |
tree | 6401f0a7ae1b39d516f86a0a44cd7c14aec569a6 /editor/editor_about.cpp | |
parent | 0154ce2c8d66528d617e10b139640fd4c4405c6b (diff) | |
download | redot-engine-fc076ece3ddecd44a62dc0febed7baee47f2eede.tar.gz |
Revert "Add missing SNAME macro optimization to all theme methods call"
This reverts commit a988fad9a092053434545c32afae91ccbdfbe792.
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.
Diffstat (limited to 'editor/editor_about.cpp')
-rw-r--r-- | editor/editor_about.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp index 267fe875ca..54377971c6 100644 --- a/editor/editor_about.cpp +++ b/editor/editor_about.cpp @@ -43,12 +43,12 @@ static const String META_TEXT_TO_COPY = "text_to_copy"; void EditorAbout::_theme_changed() { const Ref<Font> font = get_theme_font(SNAME("source"), SNAME("EditorFonts")); const int font_size = get_theme_font_size(SNAME("source_size"), SNAME("EditorFonts")); - _tpl_text->add_theme_font_override(SNAME("normal_font"), font); - _tpl_text->add_theme_font_size_override(SNAME("normal_font_size"), font_size); - _tpl_text->add_theme_constant_override(SNAME("line_separation"), 6 * EDSCALE); - _license_text->add_theme_font_override(SNAME("normal_font"), font); - _license_text->add_theme_font_size_override(SNAME("normal_font_size"), font_size); - _license_text->add_theme_constant_override(SNAME("line_separation"), 6 * EDSCALE); + _tpl_text->add_theme_font_override("normal_font", font); + _tpl_text->add_theme_font_size_override("normal_font_size", font_size); + _tpl_text->add_theme_constant_override("line_separation", 6 * EDSCALE); + _license_text->add_theme_font_override("normal_font", font); + _license_text->add_theme_font_size_override("normal_font_size", font_size); + _license_text->add_theme_constant_override("line_separation", 6 * EDSCALE); _logo->set_texture(get_theme_icon(SNAME("Logo"), SNAME("EditorIcons"))); } @@ -101,7 +101,7 @@ ScrollContainer *EditorAbout::_populate_list(const String &p_name, const List<St il->set_same_column_width(true); il->set_auto_height(true); il->set_mouse_filter(Control::MOUSE_FILTER_IGNORE); - il->add_theme_constant_override(SNAME("hseparation"), 16 * EDSCALE); + il->add_theme_constant_override("hseparation", 16 * EDSCALE); while (*names_ptr) { il->add_item(String::utf8(*names_ptr++), nullptr, false); } @@ -126,7 +126,7 @@ EditorAbout::EditorAbout() { HBoxContainer *hbc = memnew(HBoxContainer); hbc->set_h_size_flags(Control::SIZE_EXPAND_FILL); hbc->set_alignment(BoxContainer::ALIGNMENT_CENTER); - hbc->add_theme_constant_override(SNAME("separation"), 30 * EDSCALE); + hbc->add_theme_constant_override("separation", 30 * EDSCALE); add_child(vbc); vbc->add_child(hbc); |