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/plugins/animation_player_editor_plugin.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/plugins/animation_player_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 2a1843fbf2..320c47e820 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -101,10 +101,10 @@ void AnimationPlayerEditor::_notification(int p_what) { get_tree()->connect("node_removed", callable_mp(this, &AnimationPlayerEditor::_node_removed)); - add_theme_style_override(SNAME("panel"), editor->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel"))); + add_theme_style_override("panel", editor->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel"))); } break; case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { - add_theme_style_override(SNAME("panel"), editor->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel"))); + add_theme_style_override("panel", editor->get_gui_base()->get_theme_stylebox(SNAME("panel"), SNAME("Panel"))); } break; case NOTIFICATION_TRANSLATION_CHANGED: case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: @@ -137,8 +137,8 @@ void AnimationPlayerEditor::_notification(int p_what) { pin->set_icon(get_theme_icon(SNAME("Pin"), SNAME("EditorIcons"))); - tool_anim->add_theme_style_override(SNAME("normal"), get_theme_stylebox(SNAME("normal"), SNAME("Button"))); - track_editor->get_edit_menu()->add_theme_style_override(SNAME("normal"), get_theme_stylebox(SNAME("normal"), SNAME("Button"))); + tool_anim->add_theme_style_override("normal", get_theme_stylebox(SNAME("normal"), SNAME("Button"))); + track_editor->get_edit_menu()->add_theme_style_override("normal", get_theme_stylebox(SNAME("normal"), SNAME("Button"))); #define ITEM_ICON(m_item, m_icon) tool_anim->get_popup()->set_item_icon(tool_anim->get_popup()->get_item_index(m_item), get_theme_icon(SNAME(m_icon), SNAME("EditorIcons"))) |
