summaryrefslogtreecommitdiff
path: root/scene/gui/rich_text_label.cpp
diff options
context:
space:
mode:
authorDominik 'dreamsComeTrue' Jasiński <dominikjasinski@o2.pl>2020-04-06 22:26:58 +0200
committerDominik 'dreamsComeTrue' Jasiński <dominikjasinski@o2.pl>2020-04-06 22:26:58 +0200
commit06a79f260c4c762cce5544471c8b327753ebd153 (patch)
tree06af5f308b9e2c9602ca717bca6ad49f77146922 /scene/gui/rich_text_label.cpp
parentbefbdda7f269cae440640b88e3cbf8fbb7e6a614 (diff)
Calculate strike-through position correctly
Fixes: #37637
Diffstat (limited to 'scene/gui/rich_text_label.cpp')
-rw-r--r--scene/gui/rich_text_label.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 3ab5e5427d..2a05207a0f 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -608,7 +608,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
} else if (strikethrough) {
Color uc = color;
uc.a *= 0.5;
- int uy = y + lh / 2 - line_descent + 2;
+ int uy = y + lh - (line_ascent + line_descent) / 2;
float strikethrough_width = 1.0;
#ifdef TOOLS_ENABLED
strikethrough_width *= EDSCALE;