summaryrefslogtreecommitdiff
path: root/editor/plugins/texture_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-02-08 10:14:58 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-02-08 10:17:25 +0100
commitfc076ece3ddecd44a62dc0febed7baee47f2eede (patch)
tree6401f0a7ae1b39d516f86a0a44cd7c14aec569a6 /editor/plugins/texture_editor_plugin.cpp
parent0154ce2c8d66528d617e10b139640fd4c4405c6b (diff)
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/plugins/texture_editor_plugin.cpp')
-rw-r--r--editor/plugins/texture_editor_plugin.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index 85b5cde066..84b33f0986 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -50,7 +50,7 @@ void TexturePreview::_notification(int p_what) {
if (metadata_label) {
Ref<Font> metadata_label_font = get_theme_font(SNAME("expression"), SNAME("EditorFonts"));
- metadata_label->add_theme_font_override(SNAME("font"), metadata_label_font);
+ metadata_label->add_theme_font_override("font", metadata_label_font);
}
checkerboard->set_texture(get_theme_icon(SNAME("Checkerboard"), SNAME("EditorIcons")));
@@ -94,14 +94,14 @@ TexturePreview::TexturePreview(Ref<Texture2D> p_texture, bool p_show_metadata) {
p_texture->connect("changed", callable_mp(this, &TexturePreview::_update_metadata_label_text));
// It's okay that these colors are static since the grid color is static too.
- metadata_label->add_theme_color_override(SNAME("font_color"), Color::named("white"));
- metadata_label->add_theme_color_override(SNAME("font_color_shadow"), Color::named("black"));
+ metadata_label->add_theme_color_override("font_color", Color::named("white"));
+ metadata_label->add_theme_color_override("font_color_shadow", Color::named("black"));
- metadata_label->add_theme_font_size_override(SNAME("font_size"), 16 * EDSCALE);
- metadata_label->add_theme_color_override(SNAME("font_outline_color"), Color::named("black"));
- metadata_label->add_theme_constant_override(SNAME("outline_size"), 2 * EDSCALE);
+ metadata_label->add_theme_font_size_override("font_size", 16 * EDSCALE);
+ metadata_label->add_theme_color_override("font_outline_color", Color::named("black"));
+ metadata_label->add_theme_constant_override("outline_size", 2 * EDSCALE);
- metadata_label->add_theme_constant_override(SNAME("shadow_outline_size"), 1);
+ metadata_label->add_theme_constant_override("shadow_outline_size", 1);
metadata_label->set_h_size_flags(Control::SIZE_SHRINK_END);
metadata_label->set_v_size_flags(Control::SIZE_SHRINK_END);