Setting ComboBox's PopupMenu colors

Little bump, explanatory 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);
    // ...

needs a change of the PopupMenu::LookAndFeelMethods though, but now that we have the PopupMenu::Options that seems like the perfect use for it

2 Likes