From 330afdd6cb75c432327f8e550d1fe8634100741b Mon Sep 17 00:00:00 2001 From: Umang Kalra Date: Fri, 31 Jul 2020 00:36:46 +0530 Subject: [PATCH] Fix RichTextLabel center alignment bug Fixes #40207. (cherry picked from commit cec21ab82cff23b2fa97a7c5e25961a38341c8cf) --- scene/gui/rich_text_label.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 88125087da9..e2acc5321b8 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -188,7 +188,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int & if (p_mode != PROCESS_CACHE && align != ALIGN_FILL) wofs += line_ofs; - int begin = wofs; + int begin = margin; Ref cfont = _find_font(it); if (cfont.is_null())