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:
parent
68e0e0e329
commit
39b5c22a29
10 changed files with 48 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue