diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-05-15 08:00:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-15 08:00:50 +0200 |
commit | 27dd41519694c3a9e9e5f6abc80b8636d93f5521 (patch) | |
tree | fdeba3328a4c84aa75650c63f2551cd6559344d3 /scene/gui | |
parent | 4c3568e77c1ccc9337b37bb1820e68137c7b15d5 (diff) | |
parent | 69359f2220c05e9022d5a85327172e018069a33f (diff) |
Merge pull request #8759 from AlexHoratio/master
Fixed #8526, popup menu width now responds to submenu icon
Diffstat (limited to 'scene/gui')
-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); } |