From d98528ca3ce4173b3138288630b027424b713746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pa=CC=84vels=20Nadtoc=CC=8Cajevs?= <7645683+bruvzg@users.noreply.github.com> Date: Sat, 18 Jan 2025 22:07:22 +0200 Subject: [PATCH] Fix Label vertical line alignment. --- scene/gui/label.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 8d8f32cc1d..c3fe9283c6 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -713,7 +713,9 @@ void Label::_notification(int p_what) { int asc = TS->shaped_text_get_ascent(line_rid); int dsc = TS->shaped_text_get_descent(line_rid); if (asc + dsc < font_h) { - dsc = font_h - asc; + int diff = font_h - (asc + dsc); + asc += diff / 2; + dsc += diff - (diff / 2); } const Glyph *glyphs = TS->shaped_text_get_glyphs(line_rid);