summaryrefslogtreecommitdiff
path: root/editor/plugins/audio_stream_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/audio_stream_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/audio_stream_editor_plugin.cpp')
-rw-r--r--editor/plugins/audio_stream_editor_plugin.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/editor/plugins/audio_stream_editor_plugin.cpp b/editor/plugins/audio_stream_editor_plugin.cpp
index e20e6dc9ea..086d5474ba 100644
--- a/editor/plugins/audio_stream_editor_plugin.cpp
+++ b/editor/plugins/audio_stream_editor_plugin.cpp
@@ -224,7 +224,7 @@ AudioStreamEditor::AudioStreamEditor() {
_preview->add_child(_indicator);
HBoxContainer *hbox = memnew(HBoxContainer);
- hbox->add_theme_constant_override(SNAME("separation"), 0);
+ hbox->add_theme_constant_override("separation", 0);
vbox->add_child(hbox);
_play_button = memnew(Button);
@@ -243,14 +243,14 @@ AudioStreamEditor::AudioStreamEditor() {
_current_label = memnew(Label);
_current_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_RIGHT);
_current_label->set_h_size_flags(SIZE_EXPAND_FILL);
- _current_label->add_theme_font_override(SNAME("font"), EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
- _current_label->add_theme_font_size_override(SNAME("font_size"), EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
+ _current_label->add_theme_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
+ _current_label->add_theme_font_size_override("font_size", EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
_current_label->set_modulate(Color(1, 1, 1, 0.5));
hbox->add_child(_current_label);
_duration_label = memnew(Label);
- _duration_label->add_theme_font_override(SNAME("font"), EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
- _duration_label->add_theme_font_size_override(SNAME("font_size"), EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
+ _duration_label->add_theme_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_theme_font(SNAME("status_source"), SNAME("EditorFonts")));
+ _duration_label->add_theme_font_size_override("font_size", EditorNode::get_singleton()->get_gui_base()->get_theme_font_size(SNAME("status_source_size"), SNAME("EditorFonts")));
hbox->add_child(_duration_label);
}