PopupMenu fonts using LookAndFeel

On my way to implement a LookAndFeel for popup menu, I succeded in drawing a red background for popup menu, but I could not find a way to change the font, when apparently the method is the strictly the same !

in .h :

[code]class My_Look_And_Feel : public Component,
public LookAndFeel
My_Look_And_Feel ();

//[UserMethods]     -- You can add your own custom methods in this section.
void drawPopupMenuBackground (Graphics &g, int width, int height);
const Font getMenuBarFont (MenuBarComponent &menuBar,int  itemIndex, const String &  itemText);

void paint (Graphics& g);
void resized();



My_Look_And_Feel (const My_Look_And_Feel&);
const My_Look_And_Feel& operator= (const My_Look_And_Feel&);


And in the cpp file :

[code]void My_Look_And_Feel::drawPopupMenuBackground (Graphics &g, int width, int height)
g.fillAll (Colours::red);
} <<<<< this one gets called

const Font My_Look_And_Feel::getMenuBarFont(MenuBarComponent &menuBar, int itemIndex, const String & itemText)
Font myFont;
return myFont;
} <<<<< this one never gets called[/code]

It must be some syntax problem, I really don’t have any clue, the getMenuBarFont seems to never be called, what am I doing wrong ?


const Font My_Look_And_Feel::getPopupMenuFont()


I should sleep more , thanks !


Hey! Is there a way to change the font size of an PopupMenu item responsively? The LnF method does not know about the PopupMenu object, neither the editor window size… It just looks strange that everything is smoothly responsive in my GUI except of the dropdowns… Thanks in advance!

Add a public method in your LnF to set the font size… and if your GUI changes size… set the font size and trigger a repaint.