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:
parent
460b71e925
commit
bcd7ae1fb5
1 changed files with 4 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue