Merge pull request #28554 from YeldhamDev/popupmenu_minsize_fix

Fix regression on 'PopupMenu's minimal size
This commit is contained in:
Rémi Verschelde 2019-05-01 08:09:51 +02:00 committed by GitHub
commit a8194eaef3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -93,14 +93,14 @@ Size2 PopupMenu::get_minimum_size() const {
if (items[i].submenu != "")
size.width += get_icon("submenu")->get_width();
if (has_check)
size.width += check_w;
max_w = MAX(max_w, size.width + icon_w);
max_w = MAX(max_w, size.width);
minsize.height += size.height;
}
minsize.width += max_w + accel_max_w;
minsize.width += max_w + icon_w + accel_max_w;
if (has_check)
minsize.width += check_w;
return minsize;
}