Tree: Fix offset relationship lines with Hide Folding

This commit is contained in:
BrotherShort
2025-03-19 23:22:24 +08:00
committed by Rémi Verschelde
parent b13c96b097
commit f660cdb7cf

View File

@ -2655,7 +2655,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
int root_ofs = children_pos.x + ((p_item->disable_folding || hide_folding) ? theme_cache.h_separation : theme_cache.item_margin);
Point2i root_pos = Point2i(root_ofs, children_pos.y + child_self_height / 2) - theme_cache.offset + p_draw_ofs;
if (c->get_visible_child_count() > 0) {
if (!hide_folding && !p_item->disable_folding && c->get_visible_child_count() > 0) {
root_pos -= Point2i(theme_cache.arrow->get_width(), 0);
}
root_pos.x = MIN(root_pos.x, get_column_width(0) + p_draw_ofs.x);