summaryrefslogtreecommitdiff
path: root/editor/plugins/sprite_frames_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/sprite_frames_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/sprite_frames_editor_plugin.cpp')
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index e504756440..419076a3f6 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -328,10 +328,10 @@ void SpriteFramesEditor::_notification(int p_what) {
[[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
- split_sheet_scroll->add_theme_style_override(SNAME("bg"), get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
+ split_sheet_scroll->add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
} break;
case NOTIFICATION_READY: {
- add_theme_constant_override(SNAME("autohide"), 1); // Fixes the dragger always showing up.
+ add_theme_constant_override("autohide", 1); // Fixes the dragger always showing up.
} break;
}
}
@@ -1247,8 +1247,8 @@ SpriteFramesEditor::SpriteFramesEditor() {
split_sheet_panel->add_child(split_sheet_zoom_margin);
split_sheet_zoom_margin->set_h_size_flags(0);
split_sheet_zoom_margin->set_v_size_flags(0);
- split_sheet_zoom_margin->add_theme_constant_override(SNAME("margin_top"), 5);
- split_sheet_zoom_margin->add_theme_constant_override(SNAME("margin_left"), 5);
+ split_sheet_zoom_margin->add_theme_constant_override("margin_top", 5);
+ split_sheet_zoom_margin->add_theme_constant_override("margin_left", 5);
HBoxContainer *split_sheet_zoom_hb = memnew(HBoxContainer);
split_sheet_zoom_margin->add_child(split_sheet_zoom_hb);