I want to make the background of my popup menu transparent , while it is white background now.
Even I commented all content of paint function in juce_PopMenu.cpp for test , its background became black other than transparent.
I have done that by adding a method in the LookAndFeel class IsPopupMenuOpaque()I override this method in my LookAndFeel.
Then I have replaced the code in PopupMenu::Window ctor, I call:setOpaque (getLookAndFeel().IsPopupMenuOpaque());instead of setOpaque (true);
One more thing is that on win32 drop shadow does not handle correctly semi transparent window (at least it is the case with the version of Juce I am using), so I have to do remove drop shadows on Windows:
int MyLookAndFeel::getMenuWindowFlags()
{
//on win32 drop shadow does not handle correctly semi transparent window
#if WIN32__
return 0;
#else
return ComponentPeer::windowHasDropShadow;
#endif
}