summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-04-07 09:14:29 +0200
committerGitHub <noreply@github.com>2020-04-07 09:14:29 +0200
commit2c6affe084f234581901941d0b80b8f9706d7b56 (patch)
tree4f1d054db0106dc057ea21aeb3d7a54b8bfa18ae
parent5d82fa74d940d3460f1c902514749a1c5a959c7d (diff)
parent06a79f260c4c762cce5544471c8b327753ebd153 (diff)
Merge pull request #37642 from dreamsComeTrue/rich-text-strike-fix
Calculate strike-through y-position correctly (RichTexteLabel)
-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;