From 69359f2220c05e9022d5a85327172e018069a33f Mon Sep 17 00:00:00 2001 From: AlexHoratio Date: Sun, 14 May 2017 12:42:42 +0100 Subject: Fixed #8526, popup menu width now responds to submenu icon --- scene/gui/popup_menu.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scene/gui') diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index 9b9dd820b2..e3f26e0f0b 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -108,6 +108,11 @@ Size2 PopupMenu::get_minimum_size() const { accel_max_w = MAX(accel_w, accel_max_w); } + if (items[i].submenu != "") { + + size.width += get_icon("submenu")->get_width(); + } + minsize.height += size.height; max_w = MAX(max_w, size.width); } -- cgit v1.2.3