diff options
| author | Jakob Sinclair | 2017-10-24 20:45:47 +0200 |
|---|---|---|
| committer | Jakob Sinclair | 2017-10-24 21:06:27 +0200 |
| commit | 708982bee191988e028f2d472412582492781219 (patch) | |
| tree | 76b89aef0586ae64e08f9ee0936bb9b2c29a4893 /scene/gui/tree.cpp | |
| parent | 552ed07cfd2fce1f885b5a7739a0c086ab8c1589 (diff) | |
| download | godot-708982bee191988e028f2d472412582492781219.tar.gz godot-708982bee191988e028f2d472412582492781219.tar.zst godot-708982bee191988e028f2d472412582492781219.zip | |
Fix margin with tree drawing
Fixes @akien-mga point brought up in #12352
Signed-off-by: Jakob Sinclair <sinclair.jakob@mailbox.org>
Diffstat (limited to '')
| -rw-r--r-- | scene/gui/tree.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 931dcfed9..5c6f2b0d0 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -1126,7 +1126,7 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2 if (p_item->cells[i].selected && select_mode != SELECT_ROW) { - Rect2i r(item_rect.position, item_rect.size); + Rect2i r(cell_rect.position, cell_rect.size); if (p_item->cells[i].text.size() > 0) { float icon_width = p_item->cells[i].get_icon_size().width; r.position.x += icon_width; |
