diff options
author | James Buck <jamesbuck11@gmail.com> | 2019-06-09 22:33:47 -0500 |
---|---|---|
committer | James Buck <jamesbuck11@gmail.com> | 2019-06-09 22:33:47 -0500 |
commit | 215fed1fb37dd79931b64ad114851461cffbd3ca (patch) | |
tree | 8b424b9d8ed50da7e03e3a5fec41b94a221b0e72 /scene | |
parent | abbbde87e28982150d30e748b89c5303384909ca (diff) |
Fix Tree button tooltips
Fixes #22777
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 2007ae2669..9bd42c05ad 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -3721,6 +3721,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(); |