Hi there, I saw @daniel post about the colour in the popupMenu. I am trying the same here.
I have a comboBox with different Items and I would like to change the background color of the items.
And I tried the code but I guess I am missing something. Here is @daniel code
Colour LookAndFeel::findPopupMenuColour (PopupMenu::ColourIDs colourId, const PopupMenu::Options& options)
{
if (auto* target = options.getTargetComponent())
return target->findColour (colourId);
return findColour (colourId);
}
void LookAndFeel_V2::drawPopupMenuBackground (Graphics& g, int width, int height, const PopupMenu::Options& options)
{
auto background = findPopupMenuColour (PopupMenu::backgroundColourId, options);
// ...
I have changed the code in LookAndFeel_V2 but I am not sure whats next. I tried to send the component as an argument, but I can’t even call the function.
Thanks in advance