Correctly calculate position of the folding arrow in Tree

This commit is contained in:
Yuri Sizov 2021-09-25 02:01:35 +03:00
parent 94f658a8d2
commit 020807dc0f

View file

@ -1404,7 +1404,10 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
arrow = cache.arrow;
}
arrow->draw(ci, p_pos + p_draw_ofs + Point2i(0, (label_h - arrow->get_height()) / 2) - cache.offset);
Point2 apos = p_pos + Point2i(0, (label_h - arrow->get_height()) / 2) - cache.offset + p_draw_ofs;
apos.x += cache.item_margin - arrow->get_width();
arrow->draw(ci, apos);
}
}