summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-01-16 13:29:02 +0100
committerGitHub <noreply@github.com>2019-01-16 13:29:02 +0100
commit58d7619a79362cfb1b83b6fdba3c7b3609a92f07 (patch)
tree924f07004a1eee193af1d43947e729da0dd8c736 /scene/gui
parentb910b22d74386f8d519e2b80a76d42e14d639584 (diff)
parent1e603b706effe40e5c3b40c056d9326ccbf6f3e9 (diff)
Merge pull request #25036 from volzhs/tree-focus-rect
Update rect size on select
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/tree.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index d2411d97e3..514be00227 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1158,10 +1158,9 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
r.position.x += icon_width;
r.size.x -= icon_width;
}
- //r.grow(cache.selected->get_margin(MARGIN_LEFT));
+ p_item->set_meta("__focus_rect", Rect2(r.position, r.size));
if (has_focus()) {
cache.selected_focus->draw(ci, r);
- p_item->set_meta("__focus_rect", Rect2(r.position, r.size));
} else {
cache.selected->draw(ci, r);
}