Browse Source

WidgetsDemo: Avoid assertion in menu with custom components

v6.1.6
reuk 4 years ago
parent
commit
8b3fe6f250
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      examples/GUI/WidgetsDemo.h

+ 4
- 1
examples/GUI/WidgetsDemo.h 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


Loading…
Cancel
Save