From 6b6f101983bcbf1513156046108edc2afe24982c Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Fri, 2 Oct 2020 15:02:02 +0300 Subject: [Complex Text Layouts] Refactor RichTextLabel. --- editor/editor_help.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'editor') diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 4c553950a7..41010b6a86 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -230,7 +230,7 @@ void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview if (p_overview) { class_desc->push_cell(); - class_desc->push_align(RichTextLabel::ALIGN_RIGHT); + class_desc->push_paragraph(RichTextLabel::ALIGN_RIGHT, Control::TEXT_DIRECTION_AUTO, ""); } else { static const char32_t prefix[3] = { 0x25CF /* filled circle */, ' ', 0 }; class_desc->add_text(String(prefix)); @@ -528,7 +528,7 @@ void EditorHelp::_update_doc() { property_line[cd.properties[i].name] = class_desc->get_line_count() - 2; //gets overridden if description class_desc->push_cell(); - class_desc->push_align(RichTextLabel::ALIGN_RIGHT); + class_desc->push_paragraph(RichTextLabel::ALIGN_RIGHT, Control::TEXT_DIRECTION_AUTO, ""); class_desc->push_font(doc_code_font); _add_type(cd.properties[i].type, cd.properties[i].enumeration); class_desc->pop(); @@ -729,7 +729,7 @@ void EditorHelp::_update_doc() { theme_property_line[cd.theme_properties[i].name] = class_desc->get_line_count() - 2; //gets overridden if description class_desc->push_cell(); - class_desc->push_align(RichTextLabel::ALIGN_RIGHT); + class_desc->push_paragraph(RichTextLabel::ALIGN_RIGHT, Control::TEXT_DIRECTION_AUTO, ""); class_desc->push_font(doc_code_font); _add_type(cd.theme_properties[i].type); class_desc->pop(); @@ -1500,7 +1500,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) { tag_stack.push_front(tag); } else if (tag == "center") { //align to center - p_rt->push_align(RichTextLabel::ALIGN_CENTER); + p_rt->push_paragraph(RichTextLabel::ALIGN_CENTER, Control::TEXT_DIRECTION_AUTO, ""); pos = brk_end + 1; tag_stack.push_front(tag); } else if (tag == "br") { -- cgit v1.2.3