PopupMenu custom bufferHeight

With the release of Logic Pro for iOS we’re probably going to see a lot more AUv3 plugins. One of the requirements this brings is using a parent component for PopupMenus instead of child windows. This happens automatically on iOS. Unfortunately the current “parented” PopupMenu code has some weird quirks.

If I build AUv3 of my plugins I get a lot of PopupMenus that pop upwards for seemingly no reason at all - especially ones with just a few entries in the lower half of my GUIs.
Checking the Juce code I see that a PopupMenu always pops upwards if there’s not at least “bufferHeight” pixels space below if it would pop downwards and bufferHeight is set to 30 pixels! In my humble opinion this is far too much. By a lot.

I’ll now patch my Juce just for this, but that’s just silly. Can we please get this reduced or at least be part of LookAndFeel?
While I’m at it… why does the PopupMenu code use LookAndFeel::drawResizableFrame(…) in paintOverChildren to draw the weird outline for parented PopupMenus? That look-and-feels :sunglasses: wrong and should probably be a separate method?

2 Likes

Yes, this has been a problem for me too! Another problem I’ve had is that there’s no way to control the direction in which nested sub-menus are displayed. They pop upwards if they are on the lower half of the screen and downwards otherwise, but this is often not what I need. Having control over the popup menu direction can be quite necessary, specially when working with smaller screens.