From fed6b0dfe5aefc4ca7beb66f63114ffe06039a6e Mon Sep 17 00:00:00 2001 From: passivestar <60579014+passivestar@users.noreply.github.com> Date: Sat, 26 Jul 2025 16:32:01 +0400 Subject: [PATCH] Fix Tree cell text vertical alignment --- scene/gui/tree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index da73fbfeb7..7c85239b7e 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -2466,7 +2466,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2 } Point2i text_pos = item_rect.position; - text_pos.y += Math::floor(p_draw_ofs.y) - _get_title_button_height(); + text_pos.y += Math::floor((item_rect.size.y - p_item->cells[i].text_buf->get_size().y) * 0.5); switch (p_item->cells[i].mode) { case TreeItem::CELL_MODE_STRING: {