diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-02-08 10:30:18 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-02-08 10:31:56 +0100 |
commit | 6eeeb9a63ce6f9dc6134429ed9c6cf92b1a8f2ed (patch) | |
tree | 8f69d8e77613ecb6b0add1fda117a003f8ef10b4 /editor | |
parent | fc076ece3ddecd44a62dc0febed7baee47f2eede (diff) |
Re-add missing `SNAME` macros in `get_theme_*` calls
They were removed in the previous commit reverting the addition of `SNAME`
to `add_theme_*` and theme setter methods, which is not wanted.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_inspector.cpp | 2 | ||||
-rw-r--r-- | editor/editor_settings_dialog.cpp | 16 | ||||
-rw-r--r-- | editor/editor_toaster.cpp | 30 | ||||
-rw-r--r-- | editor/import/dynamicfont_import_settings.cpp | 68 | ||||
-rw-r--r-- | editor/plugins/replication_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/text_control_editor_plugin.cpp | 12 |
6 files changed, 66 insertions, 66 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 29d1752578..04bf333eaf 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -3020,7 +3020,7 @@ void EditorInspector::_update_inspector_bg() { n = n->get_parent(); } count_subinspectors = MIN(15, count_subinspectors); - add_theme_style_override("bg", get_theme_stylebox("sub_inspector_bg" + itos(count_subinspectors), "Editor")); + add_theme_style_override("bg", get_theme_stylebox("sub_inspector_bg" + itos(count_subinspectors), SNAME("Editor"))); } else { add_theme_style_override("bg", get_theme_stylebox(SNAME("bg"), SNAME("Tree"))); } diff --git a/editor/editor_settings_dialog.cpp b/editor/editor_settings_dialog.cpp index 1cb95226ec..fc37590337 100644 --- a/editor/editor_settings_dialog.cpp +++ b/editor/editor_settings_dialog.cpp @@ -272,15 +272,15 @@ void EditorSettingsDialog::_create_shortcut_treeitem(TreeItem *p_parent, const S shortcut_item->set_text(1, sc_text); if (sc_text == "None") { // Fade out unassigned shortcut labels for easier visual grepping. - shortcut_item->set_custom_color(1, shortcuts->get_theme_color("font_color", "Label") * Color(1, 1, 1, 0.5)); + shortcut_item->set_custom_color(1, shortcuts->get_theme_color(SNAME("font_color"), SNAME("Label")) * Color(1, 1, 1, 0.5)); } if (p_allow_revert) { - shortcut_item->add_button(1, shortcuts->get_theme_icon("Reload", "EditorIcons"), SHORTCUT_REVERT); + shortcut_item->add_button(1, shortcuts->get_theme_icon(SNAME("Reload"), SNAME("EditorIcons")), SHORTCUT_REVERT); } - shortcut_item->add_button(1, shortcuts->get_theme_icon("Add", "EditorIcons"), SHORTCUT_ADD); - shortcut_item->add_button(1, shortcuts->get_theme_icon("Close", "EditorIcons"), SHORTCUT_ERASE); + shortcut_item->add_button(1, shortcuts->get_theme_icon(SNAME("Add"), SNAME("EditorIcons")), SHORTCUT_ADD); + shortcut_item->add_button(1, shortcuts->get_theme_icon(SNAME("Close"), SNAME("EditorIcons")), SHORTCUT_ERASE); shortcut_item->set_meta("is_action", p_is_action); shortcut_item->set_meta("type", "shortcut"); @@ -299,11 +299,11 @@ void EditorSettingsDialog::_create_shortcut_treeitem(TreeItem *p_parent, const S event_item->set_text(0, shortcut_item->get_child_count() == 1 ? "Primary" : ""); event_item->set_text(1, ie->as_text()); - event_item->add_button(1, shortcuts->get_theme_icon("Edit", "EditorIcons"), SHORTCUT_EDIT); - event_item->add_button(1, shortcuts->get_theme_icon("Close", "EditorIcons"), SHORTCUT_ERASE); + event_item->add_button(1, shortcuts->get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")), SHORTCUT_EDIT); + event_item->add_button(1, shortcuts->get_theme_icon(SNAME("Close"), SNAME("EditorIcons")), SHORTCUT_ERASE); - event_item->set_custom_bg_color(0, shortcuts->get_theme_color("dark_color_3", "Editor")); - event_item->set_custom_bg_color(1, shortcuts->get_theme_color("dark_color_3", "Editor")); + event_item->set_custom_bg_color(0, shortcuts->get_theme_color(SNAME("dark_color_3"), SNAME("Editor"))); + event_item->set_custom_bg_color(1, shortcuts->get_theme_color(SNAME("dark_color_3"), SNAME("Editor"))); event_item->set_meta("is_action", p_is_action); event_item->set_meta("type", "event"); diff --git a/editor/editor_toaster.cpp b/editor/editor_toaster.cpp index 6c9e4ab0fc..24227b3a6b 100644 --- a/editor/editor_toaster.cpp +++ b/editor/editor_toaster.cpp @@ -113,22 +113,22 @@ void EditorToaster::_notification(int p_what) { disable_notifications_button->set_icon(get_theme_icon(SNAME("NotificationDisabled"), SNAME("EditorIcons"))); // Styleboxes background. - info_panel_style_background->set_bg_color(get_theme_color("base_color", "Editor")); + info_panel_style_background->set_bg_color(get_theme_color(SNAME("base_color"), SNAME("Editor"))); - warning_panel_style_background->set_bg_color(get_theme_color("base_color", "Editor")); - warning_panel_style_background->set_border_color(get_theme_color("warning_color", "Editor")); + warning_panel_style_background->set_bg_color(get_theme_color(SNAME("base_color"), SNAME("Editor"))); + warning_panel_style_background->set_border_color(get_theme_color(SNAME("warning_color"), SNAME("Editor"))); - error_panel_style_background->set_bg_color(get_theme_color("base_color", "Editor")); - error_panel_style_background->set_border_color(get_theme_color("error_color", "Editor")); + error_panel_style_background->set_bg_color(get_theme_color(SNAME("base_color"), SNAME("Editor"))); + error_panel_style_background->set_border_color(get_theme_color(SNAME("error_color"), SNAME("Editor"))); // Styleboxes progress. - info_panel_style_progress->set_bg_color(get_theme_color("base_color", "Editor").lightened(0.03)); + info_panel_style_progress->set_bg_color(get_theme_color(SNAME("base_color"), SNAME("Editor")).lightened(0.03)); - warning_panel_style_progress->set_bg_color(get_theme_color("base_color", "Editor").lightened(0.03)); - warning_panel_style_progress->set_border_color(get_theme_color("warning_color", "Editor")); + warning_panel_style_progress->set_bg_color(get_theme_color(SNAME("base_color"), SNAME("Editor")).lightened(0.03)); + warning_panel_style_progress->set_border_color(get_theme_color(SNAME("warning_color"), SNAME("Editor"))); - error_panel_style_progress->set_bg_color(get_theme_color("base_color", "Editor").lightened(0.03)); - error_panel_style_progress->set_border_color(get_theme_color("error_color", "Editor")); + error_panel_style_progress->set_bg_color(get_theme_color(SNAME("base_color"), SNAME("Editor")).lightened(0.03)); + error_panel_style_progress->set_border_color(get_theme_color(SNAME("error_color"), SNAME("Editor"))); main_button->update(); disable_notifications_button->update(); @@ -256,13 +256,13 @@ void EditorToaster::_draw_button() { real_t button_radius = main_button->get_size().x / 8; switch (highest_severity) { case SEVERITY_INFO: - color = get_theme_color("accent_color", "Editor"); + color = get_theme_color(SNAME("accent_color"), SNAME("Editor")); break; case SEVERITY_WARNING: - color = get_theme_color("warning_color", "Editor"); + color = get_theme_color(SNAME("warning_color"), SNAME("Editor")); break; case SEVERITY_ERROR: - color = get_theme_color("error_color", "Editor"); + color = get_theme_color(SNAME("error_color"), SNAME("Editor")); break; default: break; @@ -360,7 +360,7 @@ Control *EditorToaster::popup(Control *p_control, Severity p_severity, double p_ if (p_time > 0.0) { Button *close_button = memnew(Button); close_button->set_flat(true); - close_button->set_icon(get_theme_icon("Close", "EditorIcons")); + close_button->set_icon(get_theme_icon(SNAME("Close"), SNAME("EditorIcons"))); close_button->connect("pressed", callable_bind(callable_mp(this, &EditorToaster::close), panel)); close_button->connect("theme_changed", callable_bind(callable_mp(this, &EditorToaster::_close_button_theme_changed), close_button)); hbox_container->add_child(close_button); @@ -442,7 +442,7 @@ void EditorToaster::close(Control *p_control) { void EditorToaster::_close_button_theme_changed(Control *p_close_button) { Button *close_button = Object::cast_to<Button>(p_close_button); if (close_button) { - close_button->set_icon(get_theme_icon("Close", "EditorIcons")); + close_button->set_icon(get_theme_icon(SNAME("Close"), SNAME("EditorIcons"))); } } diff --git a/editor/import/dynamicfont_import_settings.cpp b/editor/import/dynamicfont_import_settings.cpp index 81b98c1d45..244352fbb2 100644 --- a/editor/import/dynamicfont_import_settings.cpp +++ b/editor/import/dynamicfont_import_settings.cpp @@ -495,7 +495,7 @@ void DynamicFontImportSettings::_variation_add() { vars_item->set_text(0, TTR("New configuration")); vars_item->set_editable(0, true); - vars_item->add_button(1, vars_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove Variation")); + vars_item->add_button(1, vars_list->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove Variation")); vars_item->set_button_color(1, 0, Color(1, 1, 1, 0.75)); Ref<DynamicFontImportSettingsData> import_variation_data; @@ -643,8 +643,8 @@ void DynamicFontImportSettings::_glyph_selected() { TreeItem *item = glyph_table->get_selected(); ERR_FAIL_NULL(item); - Color scol = glyph_table->get_theme_color("box_selection_fill_color", "Editor"); - Color fcol = glyph_table->get_theme_color("font_selected_color", "Editor"); + Color scol = glyph_table->get_theme_color(SNAME("box_selection_fill_color"), SNAME("Editor")); + Color fcol = glyph_table->get_theme_color(SNAME("font_selected_color"), SNAME("Editor")); scol.a = 1.f; int32_t c = item->get_metadata(glyph_table->get_selected_column()); @@ -705,8 +705,8 @@ void DynamicFontImportSettings::_edit_range(int32_t p_start, int32_t p_end) { TreeItem *root = glyph_table->create_item(); ERR_FAIL_NULL(root); - Color scol = glyph_table->get_theme_color("box_selection_fill_color", "Editor"); - Color fcol = glyph_table->get_theme_color("font_selected_color", "Editor"); + Color scol = glyph_table->get_theme_color(SNAME("box_selection_fill_color"), SNAME("Editor")); + Color fcol = glyph_table->get_theme_color(SNAME("font_selected_color"), SNAME("Editor")); scol.a = 1.f; TreeItem *item = nullptr; @@ -719,12 +719,12 @@ void DynamicFontImportSettings::_edit_range(int32_t p_start, int32_t p_end) { item->set_text(0, _pad_zeros(String::num_int64(c, 16))); item->set_text_alignment(0, HORIZONTAL_ALIGNMENT_LEFT); item->set_selectable(0, false); - item->set_custom_bg_color(0, glyph_table->get_theme_color("dark_color_3", "Editor")); + item->set_custom_bg_color(0, glyph_table->get_theme_color(SNAME("dark_color_3"), SNAME("Editor"))); } if (font_main->has_char(c)) { item->set_text(col + 1, String::chr(c)); item->set_custom_color(col + 1, Color(1, 1, 1)); - if (selected_chars.has(c) || (font_main->get_data(0).is_valid() && selected_glyphs.has(font_main->get_data(0)->get_glyph_index(get_theme_font_size("font_size") * 2, c)))) { + if (selected_chars.has(c) || (font_main->get_data(0).is_valid() && selected_glyphs.has(font_main->get_data(0)->get_glyph_index(get_theme_font_size(SNAME("font_size")) * 2, c)))) { item->set_custom_color(col + 1, fcol); item->set_custom_bg_color(col + 1, scol); } else { @@ -732,13 +732,13 @@ void DynamicFontImportSettings::_edit_range(int32_t p_start, int32_t p_end) { item->clear_custom_bg_color(col + 1); } } else { - item->set_custom_bg_color(col + 1, glyph_table->get_theme_color("dark_color_2", "Editor")); + item->set_custom_bg_color(col + 1, glyph_table->get_theme_color(SNAME("dark_color_2"), SNAME("Editor"))); } item->set_metadata(col + 1, c); item->set_text_alignment(col + 1, HORIZONTAL_ALIGNMENT_CENTER); item->set_selectable(col + 1, true); item->set_custom_font(col + 1, font_main); - item->set_custom_font_size(col + 1, get_theme_font_size("font_size") * 2); + item->set_custom_font_size(col + 1, get_theme_font_size(SNAME("font_size")) * 2); col++; if (col == 16) { @@ -752,8 +752,8 @@ bool DynamicFontImportSettings::_char_update(int32_t p_char) { if (selected_chars.has(p_char)) { selected_chars.erase(p_char); return false; - } else if (font_main->get_data(0).is_valid() && selected_glyphs.has(font_main->get_data(0)->get_glyph_index(get_theme_font_size("font_size") * 2, p_char))) { - selected_glyphs.erase(font_main->get_data(0)->get_glyph_index(get_theme_font_size("font_size") * 2, p_char)); + } else if (font_main->get_data(0).is_valid() && selected_glyphs.has(font_main->get_data(0)->get_glyph_index(get_theme_font_size(SNAME("font_size")) * 2, p_char))) { + selected_glyphs.erase(font_main->get_data(0)->get_glyph_index(get_theme_font_size(SNAME("font_size")) * 2, p_char)); return false; } else { selected_chars.insert(p_char); @@ -767,7 +767,7 @@ void DynamicFontImportSettings::_range_update(int32_t p_start, int32_t p_end) { for (int32_t i = p_start; i <= p_end; i++) { if (font_main->has_char(i)) { if (font_main->get_data(0).is_valid()) { - all_selected = all_selected && (selected_chars.has(i) || (font_main->get_data(0).is_valid() && selected_glyphs.has(font_main->get_data(0)->get_glyph_index(get_theme_font_size("font_size") * 2, i)))); + all_selected = all_selected && (selected_chars.has(i) || (font_main->get_data(0).is_valid() && selected_glyphs.has(font_main->get_data(0)->get_glyph_index(get_theme_font_size(SNAME("font_size")) * 2, i)))); } else { all_selected = all_selected && selected_chars.has(i); } @@ -780,7 +780,7 @@ void DynamicFontImportSettings::_range_update(int32_t p_start, int32_t p_end) { } else { selected_chars.erase(i); if (font_main->get_data(0).is_valid()) { - selected_glyphs.erase(font_main->get_data(0)->get_glyph_index(get_theme_font_size("font_size") * 2, i)); + selected_glyphs.erase(font_main->get_data(0)->get_glyph_index(get_theme_font_size(SNAME("font_size")) * 2, i)); } } } @@ -809,7 +809,7 @@ void DynamicFontImportSettings::_lang_add_item(const String &p_locale) { lang_item->set_checked(0, false); lang_item->set_text(1, p_locale); lang_item->set_editable(1, true); - lang_item->add_button(2, lang_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove")); + lang_item->add_button(2, lang_list->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove")); lang_item->set_button_color(2, 0, Color(1, 1, 1, 0.75)); } @@ -841,7 +841,7 @@ void DynamicFontImportSettings::_ot_add_item(int p_option) { ot_item->set_editable(0, false); ot_item->set_text(1, "1"); ot_item->set_editable(1, true); - ot_item->add_button(2, ot_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove")); + ot_item->add_button(2, ot_list->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove")); ot_item->set_button_color(2, 0, Color(1, 1, 1, 0.75)); } @@ -868,7 +868,7 @@ void DynamicFontImportSettings::_script_add_item(int p_option) { script_item->set_checked(0, false); script_item->set_text(1, script_codes[p_option]); script_item->set_editable(1, true); - script_item->add_button(2, lang_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove")); + script_item->add_button(2, lang_list->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove")); script_item->set_button_color(2, 0, Color(1, 1, 1, 0.75)); } @@ -895,10 +895,10 @@ void DynamicFontImportSettings::_notification(int p_what) { if (p_what == NOTIFICATION_READY) { connect("confirmed", callable_mp(this, &DynamicFontImportSettings::_re_import)); } else if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) { - add_lang->set_icon(add_var->get_theme_icon("Add", "EditorIcons")); - add_script->set_icon(add_var->get_theme_icon("Add", "EditorIcons")); - add_var->set_icon(add_var->get_theme_icon("Add", "EditorIcons")); - add_ot->set_icon(add_var->get_theme_icon("Add", "EditorIcons")); + add_lang->set_icon(add_var->get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); + add_script->set_icon(add_var->get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); + add_var->set_icon(add_var->get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); + add_ot->set_icon(add_var->get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); } } @@ -1043,7 +1043,7 @@ void DynamicFontImportSettings::open_settings(const String &p_path) { inspector_vars->edit(nullptr); inspector_general->edit(nullptr); - int gww = get_theme_font("font")->get_string_size("00000", get_theme_font_size("font_size")).x + 50; + int gww = get_theme_font(SNAME("font"))->get_string_size("00000", get_theme_font_size(SNAME("font_size"))).x + 50; glyph_table->set_column_custom_minimum_width(0, gww); glyph_table->clear(); @@ -1146,7 +1146,7 @@ void DynamicFontImportSettings::open_settings(const String &p_path) { vars_item->set_text(0, TTR("Configuration") + " " + itos(i)); vars_item->set_editable(0, true); - vars_item->add_button(1, vars_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove Variation")); + vars_item->add_button(1, vars_list->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove Variation")); vars_item->set_button_color(1, 0, Color(1, 1, 1, 0.75)); Ref<DynamicFontImportSettingsData> import_variation_data_custom; @@ -1184,7 +1184,7 @@ void DynamicFontImportSettings::open_settings(const String &p_path) { lang_item->set_checked(0, true); lang_item->set_text(1, _langs[i]); lang_item->set_editable(1, true); - lang_item->add_button(2, lang_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove")); + lang_item->add_button(2, lang_list->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove")); } } else if (key == "support_overrides/language_disabled") { PackedStringArray _langs = config->get_value("params", key); @@ -1197,7 +1197,7 @@ void DynamicFontImportSettings::open_settings(const String &p_path) { lang_item->set_checked(0, false); lang_item->set_text(1, _langs[i]); lang_item->set_editable(1, true); - lang_item->add_button(2, lang_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove")); + lang_item->add_button(2, lang_list->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove")); } } else if (key == "support_overrides/script_enabled") { PackedStringArray _scripts = config->get_value("params", key); @@ -1210,7 +1210,7 @@ void DynamicFontImportSettings::open_settings(const String &p_path) { script_item->set_checked(0, true); script_item->set_text(1, _scripts[i]); script_item->set_editable(1, true); - script_item->add_button(2, lang_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove")); + script_item->add_button(2, lang_list->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove")); } } else if (key == "support_overrides/script_disabled") { PackedStringArray _scripts = config->get_value("params", key); @@ -1223,7 +1223,7 @@ void DynamicFontImportSettings::open_settings(const String &p_path) { script_item->set_checked(0, false); script_item->set_text(1, _scripts[i]); script_item->set_editable(1, true); - script_item->add_button(2, lang_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove")); + script_item->add_button(2, lang_list->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove")); } } else if (key == "opentype_feature_overrides") { Dictionary features = config->get_value("params", key); @@ -1239,7 +1239,7 @@ void DynamicFontImportSettings::open_settings(const String &p_path) { ot_item->set_editable(0, false); ot_item->set_text(1, itos(value)); ot_item->set_editable(1, true); - ot_item->add_button(2, ot_list->get_theme_icon("Remove", "EditorIcons"), BUTTON_REMOVE_VAR, false, TTR("Remove")); + ot_item->add_button(2, ot_list->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_VAR, false, TTR("Remove")); ot_item->set_button_color(2, 0, Color(1, 1, 1, 0.75)); } } else { @@ -1356,7 +1356,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() { menu_ot->add_child(menu_ot_cu); menu_ot_cu->connect("id_pressed", callable_mp(this, &DynamicFontImportSettings::_ot_add_item)); - Color warn_color = (EditorNode::get_singleton()) ? EditorNode::get_singleton()->get_gui_base()->get_theme_color("warning_color", "Editor") : Color(1, 1, 0); + Color warn_color = (EditorNode::get_singleton()) ? EditorNode::get_singleton()->get_gui_base()->get_theme_color(SNAME("warning_color"), SNAME("Editor")) : Color(1, 1, 0); // Root layout @@ -1438,7 +1438,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() { add_var = memnew(Button); page2_hb_vars->add_child(add_var); add_var->set_tooltip(TTR("Add configuration")); - add_var->set_icon(add_var->get_theme_icon("Add", "EditorIcons")); + add_var->set_icon(add_var->get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); add_var->connect("pressed", callable_mp(this, &DynamicFontImportSettings::_variation_add)); vars_list = memnew(Tree); @@ -1545,8 +1545,8 @@ DynamicFontImportSettings::DynamicFontImportSettings() { for (int i = 0; i < 16; i++) { glyph_table->set_column_title(i + 1, String::num_int64(i, 16)); } - glyph_table->add_theme_style_override("selected", glyph_table->get_theme_stylebox("bg")); - glyph_table->add_theme_style_override("selected_focus", glyph_table->get_theme_stylebox("bg")); + glyph_table->add_theme_style_override("selected", glyph_table->get_theme_stylebox(SNAME("bg"))); + glyph_table->add_theme_style_override("selected_focus", glyph_table->get_theme_stylebox(SNAME("bg"))); glyph_table->add_theme_constant_override("hseparation", 0); glyph_table->set_h_size_flags(Control::SIZE_EXPAND_FILL); glyph_table->set_v_size_flags(Control::SIZE_EXPAND_FILL); @@ -1590,7 +1590,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() { add_lang = memnew(Button); hb_lang->add_child(add_lang); add_lang->set_tooltip(TTR("Add language override")); - add_lang->set_icon(add_var->get_theme_icon("Add", "EditorIcons")); + add_lang->set_icon(add_var->get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); add_lang->connect("pressed", callable_mp(this, &DynamicFontImportSettings::_lang_add)); lang_list = memnew(Tree); @@ -1618,7 +1618,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() { add_script = memnew(Button); hb_script->add_child(add_script); add_script->set_tooltip(TTR("Add script override")); - add_script->set_icon(add_var->get_theme_icon("Add", "EditorIcons")); + add_script->set_icon(add_var->get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); add_script->connect("pressed", callable_mp(this, &DynamicFontImportSettings::_script_add)); script_list = memnew(Tree); @@ -1646,7 +1646,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() { add_ot = memnew(Button); hb_ot->add_child(add_ot); add_ot->set_tooltip(TTR("Add feature override")); - add_ot->set_icon(add_var->get_theme_icon("Add", "EditorIcons")); + add_ot->set_icon(add_var->get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); add_ot->connect("pressed", callable_mp(this, &DynamicFontImportSettings::_ot_add)); ot_list = memnew(Tree); diff --git a/editor/plugins/replication_editor_plugin.cpp b/editor/plugins/replication_editor_plugin.cpp index 93f4a853f3..fd4fc8f59c 100644 --- a/editor/plugins/replication_editor_plugin.cpp +++ b/editor/plugins/replication_editor_plugin.cpp @@ -258,7 +258,7 @@ void ReplicationEditor::edit(MultiplayerSynchronizer *p_sync) { Ref<Texture2D> ReplicationEditor::_get_class_icon(const Node *p_node) { if (!p_node || !has_theme_icon(p_node->get_class(), "EditorIcons")) { - return get_theme_icon("ImportFail", "EditorIcons"); + return get_theme_icon(SNAME("ImportFail"), SNAME("EditorIcons")); } return get_theme_icon(p_node->get_class(), "EditorIcons"); } @@ -285,7 +285,7 @@ void ReplicationEditor::_add_property(const NodePath &p_property, bool p_spawn, icon = _get_class_icon(node); } item->set_icon(0, icon); - item->add_button(3, get_theme_icon("Remove", "EditorIcons")); + item->add_button(3, get_theme_icon(SNAME("Remove"), SNAME("EditorIcons"))); item->set_text_alignment(1, HORIZONTAL_ALIGNMENT_CENTER); item->set_cell_mode(1, TreeItem::CELL_MODE_CHECK); item->set_checked(1, p_spawn); diff --git a/editor/plugins/text_control_editor_plugin.cpp b/editor/plugins/text_control_editor_plugin.cpp index 87eff9c3e9..12f0a298d3 100644 --- a/editor/plugins/text_control_editor_plugin.cpp +++ b/editor/plugins/text_control_editor_plugin.cpp @@ -220,9 +220,9 @@ void TextControlEditor::_update_control() { } int current_font_size = edited_control->get_theme_font_size(edited_font_size); - int current_outline_size = edited_control->get_theme_constant("outline_size"); + int current_outline_size = edited_control->get_theme_constant(SNAME("outline_size")); Color current_font_color = edited_control->get_theme_color(edited_color); - Color current_outline_color = edited_control->get_theme_color("font_outline_color"); + Color current_outline_color = edited_control->get_theme_color(SNAME("font_outline_color")); if (i > 0) { same_font_size = same_font_size && (font_size == current_font_size); same_outline_size = same_outline_size && (outline_size == current_outline_size); @@ -393,7 +393,7 @@ void TextControlEditor::_outline_size_selected(double p_size) { ur->add_do_method(edited_control, "add_theme_constant_override", "outline_size", p_size); if (edited_control->has_theme_constant_override("outline_size")) { - ur->add_undo_method(edited_control, "add_theme_constant_override", "outline_size", edited_control->get_theme_constant("outline_size")); + ur->add_undo_method(edited_control, "add_theme_constant_override", "outline_size", edited_control->get_theme_constant(SNAME("outline_size"))); } else { ur->add_undo_method(edited_control, "remove_theme_constant_override", "outline_size"); } @@ -452,7 +452,7 @@ void TextControlEditor::_outline_color_changed(const Color &p_color) { ur->add_do_method(edited_control, "add_theme_color_override", "font_outline_color", p_color); if (edited_control->has_theme_color_override("font_outline_color")) { - ur->add_undo_method(edited_control, "add_theme_color_override", "font_outline_color", edited_control->get_theme_color("font_outline_color")); + ur->add_undo_method(edited_control, "add_theme_color_override", "font_outline_color", edited_control->get_theme_color(SNAME("font_outline_color"))); } else { ur->add_undo_method(edited_control, "remove_theme_color_override", "font_outline_color"); } @@ -511,12 +511,12 @@ void TextControlEditor::_clear_formatting() { ur->add_do_method(edited_control, "remove_theme_color_override", "font_outline_color"); if (edited_control->has_theme_color_override("font_outline_color")) { - ur->add_undo_method(edited_control, "add_theme_color_override", "font_outline_color", edited_control->get_theme_color("font_outline_color")); + ur->add_undo_method(edited_control, "add_theme_color_override", "font_outline_color", edited_control->get_theme_color(SNAME("font_outline_color"))); } ur->add_do_method(edited_control, "remove_theme_constant_override", "outline_size"); if (edited_control->has_theme_constant_override("outline_size")) { - ur->add_undo_method(edited_control, "add_theme_constant_override", "outline_size", edited_control->get_theme_constant("outline_size")); + ur->add_undo_method(edited_control, "add_theme_constant_override", "outline_size", edited_control->get_theme_constant(SNAME("outline_size"))); } ur->add_do_method(edited_control, "end_bulk_theme_override"); |