diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-04-07 15:46:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-07 15:46:36 +0200 |
commit | a10f28ff342c9503d3b5c82c48517e21dbbc7a77 (patch) | |
tree | 1d138391c339d829502a2be70cb42ada255ad9fd /scene/gui/rich_text_label.cpp | |
parent | 1222541c9510d72999c42bf2c934647e95fc0787 (diff) | |
parent | 9c2c2ab2b0485b83148f636318ccecd903e4af8a (diff) |
Merge pull request #37656 from Janglee123/richtext-underline-fix
Fixed underlines and striketrough not respecting visible character
Diffstat (limited to 'scene/gui/rich_text_label.cpp')
-rw-r--r-- | scene/gui/rich_text_label.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 2a05207a0f..0b314d57c5 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -411,7 +411,6 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int & break; //don't allow lines longer than assigned width } - w += cw; fw += cw; end++; @@ -552,8 +551,10 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int & } } - if (visible) + if (visible) { line_is_blank = false; + w += font->get_char_size(c[i], c[i + 1]).x; + } if (c[i] == '\t') visible = false; |