So I’ve got a PopupMenu with multiple subMenus…
In the L&F I have:
const Font CPSLookAndFeel::getPopupMenuFont()
return Font (12.0f);
The mainMenu font size is correct (12.0), but the subMenu is the default Look and Feel font size (17.0)
Am I missing something?
Well, all the menu windows get their L+F in the same way, from the original PopupMenu. Are you setting it via PopupMenu::setLookAndFeel() ?
Ah no, hang on… Of course, you’d also need to call setLookAndFeel on all your submenus.
…and thinking about it, that really shouldn’t be necessary. I’ll change it to make sure the submenus inherit their parent’s l+f. Thanks!
Yeah, at first I just set the parent… since that didn’t change the subMenus I also set the submenu L&F (as in my code in the original post)… but it still doesn’t change the subMenu(s) font…???
Try it now…
It’s 6:00am – I’ll check out the tip in a couple of hours after getting a few ZZZ’s
Try it now…
Works great! I just had to set the Parent L&F and the subMenus are right.
I used to set a custom lookandfeel on submenus (in order to use a slightly different background colour for submenus, which makes them easier to read when they are drawn above a main menu), but since this change it is not working anymore . Inheriting lookandfeel is nice, but being able to specify a custom lookandfeel was a cool feature.