Calculate strike-through position correctly

Fixes: #37637
(cherry picked from commit 06a79f260c)
This commit is contained in:
Dominik 'dreamsComeTrue' Jasiński 2020-04-06 22:26:58 +02:00 committed by Rémi Verschelde
parent ab4ea9379c
commit 5fdecebee1
1 changed files with 1 additions and 1 deletions

View File

@ -602,7 +602,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
} else if (strikethrough) { } else if (strikethrough) {
Color uc = color; Color uc = color;
uc.a *= 0.5; 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; float strikethrough_width = 1.0;
#ifdef TOOLS_ENABLED #ifdef TOOLS_ENABLED
strikethrough_width *= EDSCALE; strikethrough_width *= EDSCALE;