diff options
Diffstat (limited to 'editor/plugins/font_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/font_editor_plugin.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/editor/plugins/font_editor_plugin.cpp b/editor/plugins/font_editor_plugin.cpp index e385a84087..22c9cc9ab1 100644 --- a/editor/plugins/font_editor_plugin.cpp +++ b/editor/plugins/font_editor_plugin.cpp @@ -34,7 +34,7 @@ void FontDataPreview::_notification(int p_what) { if (p_what == NOTIFICATION_DRAW) { - Color text_color = get_theme_color("font_color", "Label"); + Color text_color = get_theme_color(SNAME("font_color"), SNAME("Label")); Color line_color = text_color; line_color.a *= 0.6; Vector2 pos = (get_size() - line->get_size()) / 2; @@ -127,7 +127,7 @@ FontDataPreview::FontDataPreview() { void FontDataEditor::_notification(int p_what) { if (p_what == NOTIFICATION_SORT_CHILDREN) { int split_width = get_name_split_ratio() * get_size().width; - button->set_size(Size2(get_theme_icon("Add", "EditorIcons")->get_width(), get_size().height)); + button->set_size(Size2(get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))->get_width(), get_size().height)); if (is_layout_rtl()) { if (le != nullptr) { fit_child_in_rect(le, Rect2(Vector2(split_width, 0), Size2(split_width, get_size().height))); @@ -145,7 +145,7 @@ void FontDataEditor::_notification(int p_what) { } if (p_what == NOTIFICATION_DRAW) { int split_width = get_name_split_ratio() * get_size().width; - Color dark_color = get_theme_color("dark_color_2", "Editor"); + Color dark_color = get_theme_color(SNAME("dark_color_2"), SNAME("Editor")); if (is_layout_rtl()) { draw_rect(Rect2(Vector2(0, 0), Size2(split_width, get_size().height)), dark_color); } else { @@ -154,9 +154,9 @@ void FontDataEditor::_notification(int p_what) { } if (p_what == NOTIFICATION_THEME_CHANGED) { if (le != nullptr) { - button->set_icon(get_theme_icon("Add", "EditorIcons")); + button->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); } else { - button->set_icon(get_theme_icon("Remove", "EditorIcons")); + button->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons"))); } queue_sort(); } @@ -187,12 +187,12 @@ void FontDataEditor::init_lang_add() { le->set_editable(true); add_child(le); - button->set_icon(get_theme_icon("Add", "EditorIcons")); + button->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); button->connect("pressed", callable_mp(this, &FontDataEditor::add_lang)); } void FontDataEditor::init_lang_edit() { - button->set_icon(get_theme_icon("Remove", "EditorIcons")); + button->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons"))); button->connect("pressed", callable_mp(this, &FontDataEditor::remove_lang)); chk->connect("toggled", callable_mp(this, &FontDataEditor::toggle_lang)); } @@ -204,12 +204,12 @@ void FontDataEditor::init_script_add() { le->set_editable(true); add_child(le); - button->set_icon(get_theme_icon("Add", "EditorIcons")); + button->set_icon(get_theme_icon(SNAME("Add"), SNAME("EditorIcons"))); button->connect("pressed", callable_mp(this, &FontDataEditor::add_script)); } void FontDataEditor::init_script_edit() { - button->set_icon(get_theme_icon("Remove", "EditorIcons")); + button->set_icon(get_theme_icon(SNAME("Remove"), SNAME("EditorIcons"))); button->connect("pressed", callable_mp(this, &FontDataEditor::remove_script)); chk->connect("toggled", callable_mp(this, &FontDataEditor::toggle_script)); } |