How do you change the main window and bar colours?

Hi All, I’m trying to hunt down where to set the main app colours.

This draws the bar at the top of the standalone. It gets the colour by doing this:
g.setColour (getCurrentColourScheme().getUIColour (ColourScheme::widgetBackground));

I have a custom look and feel class, which does this:

auto &scheme = getCurrentColourScheme();
scheme.setUIColour(ColourScheme::widgetBackground, Colours::red);

If I DBG my LNF, widgetbackground is red.

In my app, I set the my custom LNF and if I use the same method to retrieve widgetbackground it’s also red:

auto* lf = dynamic_cast<LookAndFeel_V4*>(&getLookAndFeel());
auto scheme = lf->getCurrentColourScheme();
DBG("widgetbackground: "+ String(scheme.getUIColour(GuiStyleMain::ColourScheme::widgetBackground).toString()));

But when I put a breakpoint in LookAndFeel_V4::drawDocumentWindowTitleBar, it’s not red.
It seems like my look and feel is not being used for the man document window. I’m setting it in the first component

Any ideas what I’m going wrong?
Also, where does the main window underneath all the components get painted?

This method is only used for non-native titlebars. You can switch that using topLevelWindow.setUsingNativeTitleBar (false) (in case you didn’t do that already)

Thanks for the tip. Do you know what I’d need to do to change its colour though? Or how to change the main background colour?