summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-01-11 08:51:04 +0100
committerGitHub <noreply@github.com>2022-01-11 08:51:04 +0100
commit822728220b448d7aaa537d057912d197659582ab (patch)
tree836bd0b05b175f221c3787e526906a6b68ae736f /scene/gui
parent267bee934a4da04cdbb8593901e0d6e5a050f4c2 (diff)
parentdf1c64feba55f4e9ea13a2b1be65d6b44351be6a (diff)
Merge pull request #56685 from timothyqiu/rtl-su
Fix BBCode underline prevents strikethrough from rendering
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/rich_text_label.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 348a0324f4..653838b63b 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -1005,7 +1005,8 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
float y_off = TS->shaped_text_get_underline_position(rid);
float underline_width = TS->shaped_text_get_underline_thickness(rid) * get_theme_default_base_scale();
draw_line(p_ofs + Vector2(off.x, off.y + y_off), p_ofs + Vector2(off.x + glyphs[i].advance * glyphs[i].repeat, off.y + y_off), uc, underline_width);
- } else if (_find_strikethrough(it)) {
+ }
+ if (_find_strikethrough(it)) {
Color uc = font_color;
uc.a *= 0.5;
float y_off = -TS->shaped_text_get_ascent(rid) + TS->shaped_text_get_size(rid).y / 2;