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

GUI: Ensure components refresh correctly when their look and feel changes

This commit is contained in:
reuk 2020-06-12 15:24:20 +01:00
parent 68e0e0e329
commit 39b5c22a29
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11
10 changed files with 48 additions and 14 deletions

View file

@ -56,9 +56,7 @@ struct CustomMenuBarItemHolder : public Component
//==============================================================================
BurgerMenuComponent::BurgerMenuComponent (MenuBarModel* modelToUse)
{
auto& lf = getLookAndFeel();
listBox.setRowHeight (roundToInt (lf.getPopupMenuFont().getHeight() * 2.0f));
lookAndFeelChanged();
listBox.addMouseListener (this, true);
setModel (modelToUse);
@ -283,4 +281,9 @@ void BurgerMenuComponent::handleCommandMessage (int commandID)
}
}
void BurgerMenuComponent::lookAndFeelChanged()
{
listBox.setRowHeight (roundToInt (getLookAndFeel().getPopupMenuFont().getHeight() * 2.0f));
}
} // namespace juce