1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

WidgetsDemo: Avoid assertion in menu with custom components

This commit is contained in:
reuk 2022-01-04 15:46:48 +00:00
parent 8a2bde9fec
commit 8b3fe6f250
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -571,7 +571,10 @@ struct MenuPage : public Component
struct CustomComponent : public PopupMenu::CustomComponent
{
CustomComponent (int widthIn, int heightIn, Colour backgroundIn)
: idealWidth (widthIn), idealHeight (heightIn), background (backgroundIn)
: PopupMenu::CustomComponent (false),
idealWidth (widthIn),
idealHeight (heightIn),
background (backgroundIn)
{}
void getIdealSize (int& width, int& height) override