For a Mac/Windows app that I'm testing on iOS i'm trying to replace the standard Juce menu with something more iOS-like. The code to do this is:
class testMenu : public Component
{
void paint ( Graphics &g )
{
g.setColour(Colours::crimson);
g.fillAll();
}
};
MainAppWindow::MainAppWindow()
: DocumentWindow (JUCEApplication::getInstance()->getApplicationName(),
Colours::lightgrey,
DocumentWindow::allButtons)
{
// set the look and feel
appLookAndFeel = new LookAndFeel_V3;
LookAndFeel::setDefaultLookAndFeel(appLookAndFeel);
setVisible (true);
setFullScreen (true);
setTitleBarButtonsRequired ( 0, 0 );
setTitleBarHeight(0);
setUsingNativeTitleBar (true);
testMenu *test = new testMenu;
setMenuBarComponent(test);
setMenuBar ( 0, 60 );
setMenuBarComponent(test);
#endif
// Display the main content window
setContentOwned (&MainContentWindow, false);
MainContentWindow.Display();
}
I'm getting the crimson bar at the top of the page, as expected, but above that there is a black bar where the Juce menu used to be. I can't get rid of the black bar and I can't alter the height my own menu, other than from within the menu class itself. ( BTW - the reason I call setMenuBar twice is because it ignores the call if the current menu (null) is equal to the new menu (also null). This is probably an indicator that I don't really know what I'm doing). Any thoughts?
