1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-03 16:55:53 +00:00

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

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;