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:
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user