diff options
author | AlexHoratio <linux.kwongo@gmail.com> | 2017-05-14 12:42:42 +0100 |
---|---|---|
committer | alex <linux.kwongo@gmail.com> | 2017-05-14 18:55:55 +0100 |
commit | 69359f2220c05e9022d5a85327172e018069a33f (patch) | |
tree | fc1cc4a58e127a4bd9dffb99424aac1d10aae560 /scene/gui/popup_menu.cpp | |
parent | f9fc2ef83b4af44f85979f390d9e56637d6a46d1 (diff) |
Fixed #8526, popup menu width now responds to submenu icon
Diffstat (limited to 'scene/gui/popup_menu.cpp')
-rw-r--r-- | scene/gui/popup_menu.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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); } |