1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-25 02:04:23 +00:00

PopupMenu: Avoid cropping menu items at the bottom of long menus with large borders

This commit is contained in:
reuk 2021-05-24 18:36:56 +01:00
parent 460b71e925
commit bcd7ae1fb5
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -882,12 +882,11 @@ struct MenuWindow : public Component
insertColumnBreaks (maxMenuW, maxMenuH);
workOutManualSize (maxMenuW);
auto actualH = jmin (contentHeight, maxMenuH);
height = jmin (contentHeight, maxMenuH);
needsToScroll = contentHeight > actualH;
needsToScroll = contentHeight > height;
width = updateYPositions();
height = actualH + getLookAndFeel().getPopupMenuBorderSizeWithOptions (options) * 2;
}
void insertColumnBreaks (const int maxMenuW, const int maxMenuH)
@ -972,6 +971,8 @@ struct MenuWindow : public Component
it = columnEnd;
}
contentHeight += getLookAndFeel().getPopupMenuBorderSizeWithOptions (options) * 2;
correctColumnWidths (maxMenuW);
}