diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-06-12 13:29:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-12 13:29:36 +0200 |
commit | 434a1fddf3afb890d56d09893a3d91b4402739ac (patch) | |
tree | 4c447f3ddd104003774a24d9f88d06be420a0b0e /scene | |
parent | 5522d7c2b0ffc99765e13389c31a2a8204dbc7b8 (diff) | |
parent | 215fed1fb37dd79931b64ad114851461cffbd3ca (diff) |
Merge pull request #29648 from jbuck3/tree-tooltips
Fix Tree button tooltips
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/tree.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 23b2147875..451241af40 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -3720,6 +3720,10 @@ String Tree::get_tooltip(const Point2 &p_pos) const { const TreeItem::Cell &c = it->cells[col]; int col_width = get_column_width(col); + + for (int i = 0; i < col; i++) + pos.x -= get_column_width(i); + for (int j = c.buttons.size() - 1; j >= 0; j--) { Ref<Texture> b = c.buttons[j].texture; Size2 size = b->get_size() + cache.button_pressed->get_minimum_size(); |