Skip to content

Commit fed6b0d

Browse files
committed
Fix Tree cell text vertical alignment
1 parent 0dd9178 commit fed6b0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scene/gui/tree.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2466,7 +2466,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
24662466
}
24672467

24682468
Point2i text_pos = item_rect.position;
2469-
text_pos.y += Math::floor(p_draw_ofs.y) - _get_title_button_height();
2469+
text_pos.y += Math::floor((item_rect.size.y - p_item->cells[i].text_buf->get_size().y) * 0.5);
24702470

24712471
switch (p_item->cells[i].mode) {
24722472
case TreeItem::CELL_MODE_STRING: {

0 commit comments

Comments
 (0)