Add missing SNAME macro optimization to all theme methods call

This commit is contained in:
jmb462 2022-02-06 20:17:35 +01:00
parent 95719930a8
commit a988fad9a0
90 changed files with 1648 additions and 1648 deletions

View file

@ -561,12 +561,12 @@ void ImportDock::_reimport() {
void ImportDock::_notification(int p_what) {
switch (p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
imported->add_theme_style_override("normal", get_theme_stylebox(SNAME("normal"), SNAME("LineEdit")));
imported->add_theme_style_override(SNAME("normal"), get_theme_stylebox(SNAME("normal"), SNAME("LineEdit")));
} break;
case NOTIFICATION_ENTER_TREE: {
import_opts->edit(params);
label_warning->add_theme_color_override("font_color", get_theme_color(SNAME("warning_color"), SNAME("Editor")));
label_warning->add_theme_color_override(SNAME("font_color"), get_theme_color(SNAME("warning_color"), SNAME("Editor")));
} break;
}
}
@ -579,12 +579,12 @@ void ImportDock::_set_dirty(bool p_dirty) {
if (p_dirty) {
// Add a dirty marker to notify the user that they should reimport the selected resource to see changes.
import->set_text(TTR("Reimport") + " (*)");
import->add_theme_color_override("font_color", get_theme_color(SNAME("warning_color"), SNAME("Editor")));
import->add_theme_color_override(SNAME("font_color"), get_theme_color(SNAME("warning_color"), SNAME("Editor")));
import->set_tooltip(TTR("You have pending changes that haven't been applied yet. Click Reimport to apply changes made to the import options.\nSelecting another resource in the FileSystem dock without clicking Reimport first will discard changes made in the Import dock."));
} else {
// Remove the dirty marker on the Reimport button.
import->set_text(TTR("Reimport"));
import->remove_theme_color_override("font_color");
import->remove_theme_color_override(SNAME("font_color"));
import->set_tooltip("");
}
}
@ -617,7 +617,7 @@ ImportDock::ImportDock() {
content->hide();
imported = memnew(Label);
imported->add_theme_style_override("normal", EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("normal"), SNAME("LineEdit")));
imported->add_theme_style_override(SNAME("normal"), EditorNode::get_singleton()->get_gui_base()->get_theme_stylebox(SNAME("normal"), SNAME("LineEdit")));
imported->set_clip_text(true);
content->add_child(imported);
HBoxContainer *hb = memnew(HBoxContainer);