summaryrefslogtreecommitdiff
path: root/scene/gui/tree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/tree.cpp')
-rw-r--r--scene/gui/tree.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 070948237a..318496df70 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1173,6 +1173,9 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
if (p_item->cells[i].text.size() > 0) {
float icon_width = p_item->cells[i].get_icon_size().width;
+ if (p_item->get_icon_max_width(i) > 0) {
+ icon_width = p_item->get_icon_max_width(i);
+ }
r.position.x += icon_width;
r.size.x -= icon_width;
}
@@ -3892,7 +3895,7 @@ Tree::Tree() {
popup_menu = memnew(PopupMenu);
popup_menu->hide();
add_child(popup_menu);
- // popup_menu->set_as_toplevel(true);
+ // popup_menu->set_as_top_level(true);
popup_editor = memnew(Popup);
popup_editor->set_wrap_controls(true);