1
0
Fork 0

Merge pull request #108401 from DanielGSilva/tree-guides

Draw guide lines over selection and focus styleboxes
This commit is contained in:
Thaddeus Crews 2025-07-09 11:33:17 -05:00
commit 02540477fd
No known key found for this signature in database
GPG Key ID: 8C6E5FEB5FC03CCC
1 changed files with 8 additions and 8 deletions

View File

@ -2314,14 +2314,6 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
cell_rect.size.x += theme_cache.h_separation;
}
if (theme_cache.draw_guides) {
Rect2 r = cell_rect;
if (rtl) {
r.position.x = get_size().width - r.position.x - r.size.x;
}
RenderingServer::get_singleton()->canvas_item_add_line(ci, Point2i(r.position.x, r.position.y + r.size.height), r.position + r.size, theme_cache.guide_color, 1);
}
if (i == 0 && select_mode == SELECT_ROW) {
if (p_item->cells[0].selected || is_row_hovered) {
const Rect2 content_rect = _get_content_rect();
@ -2398,6 +2390,14 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
}
}
if (theme_cache.draw_guides) {
Rect2 r = cell_rect;
if (rtl) {
r.position.x = get_size().width - r.position.x - r.size.x;
}
RenderingServer::get_singleton()->canvas_item_add_line(ci, Point2i(r.position.x, r.position.y + r.size.height), r.position + r.size, theme_cache.guide_color, 1);
}
if (p_item->cells[i].custom_bg_color) {
Rect2 r = cell_rect;
if (i == 0) {