Merge pull request #56471 from jmb462/3.x

This commit is contained in:
Rémi Verschelde 2022-01-12 16:46:44 +01:00 committed by GitHub
commit aa6dde2cde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,9 +78,7 @@ Size2 PopupMenu::get_minimum_size() const {
String text = items[i].xl_text;
size.width += font->get_string_size(text).width;
if (i > 0) {
size.height += vseparation;
}
size.height += vseparation;
if (items[i].accel || (items[i].shortcut.is_valid() && items[i].shortcut->is_valid())) {
int accel_w = hseparation * 2;
@ -522,7 +520,9 @@ void PopupMenu::_notification(int p_what) {
}
for (int i = 0; i < items.size(); i++) {
if (i > 0) {
if (i == 0) {
ofs.y += vseparation / 2;
} else {
ofs.y += vseparation;
}
Point2 item_ofs = ofs;