瀏覽代碼

Fix RichTextLabel center alignment bug

Fixes #40207.

(cherry picked from commit cec21ab82cff23b2fa97a7c5e25961a38341c8cf)
Umang Kalra 5 年之前
父節點
當前提交
330afdd6cb
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/gui/rich_text_label.cpp

+ 1 - 1
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<Font> cfont = _find_font(it);
 	if (cfont.is_null())