You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
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:
@@ -72,7 +72,7 @@ void ShaderCreateDialog::_update_theme() {
|
||||
}
|
||||
|
||||
path_button->set_icon(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")));
|
||||
status_panel->add_theme_style_override(SNAME("panel"), get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
status_panel->add_theme_style_override("panel", get_theme_stylebox(SNAME("bg"), SNAME("Tree")));
|
||||
}
|
||||
|
||||
void ShaderCreateDialog::_update_language_info() {
|
||||
@@ -419,18 +419,18 @@ String ShaderCreateDialog::_validate_path(const String &p_path) {
|
||||
void ShaderCreateDialog::_msg_script_valid(bool valid, const String &p_msg) {
|
||||
error_label->set_text("- " + p_msg);
|
||||
if (valid) {
|
||||
error_label->add_theme_color_override(SNAME("font_color"), gc->get_theme_color(SNAME("success_color"), SNAME("Editor")));
|
||||
error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("success_color"), SNAME("Editor")));
|
||||
} else {
|
||||
error_label->add_theme_color_override(SNAME("font_color"), gc->get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
}
|
||||
}
|
||||
|
||||
void ShaderCreateDialog::_msg_path_valid(bool valid, const String &p_msg) {
|
||||
path_error_label->set_text("- " + p_msg);
|
||||
if (valid) {
|
||||
path_error_label->add_theme_color_override(SNAME("font_color"), gc->get_theme_color(SNAME("success_color"), SNAME("Editor")));
|
||||
path_error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("success_color"), SNAME("Editor")));
|
||||
} else {
|
||||
path_error_label->add_theme_color_override(SNAME("font_color"), gc->get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
path_error_label->add_theme_color_override("font_color", gc->get_theme_color(SNAME("error_color"), SNAME("Editor")));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user