PropertyComponent LookAndFeel in JUCE5

After updating to version 5 of JUCE I’ve noticed that my text property components now default to the LookAndFeel_V4 dark theme, even when I set the PropertyPanel holding them to use a V2 look and feel. Before I upgraded my text fields were plain old white. Now they all look like this:

The bool property comps are fine but it seems that the look and feel used by the PropertyPanel is not propagating down to the text property components?

I’ve just tried testing this in a minimal GUI app containing just a PropertyPanel with some TextPropertyComponents and BooleanPropertyComponents and setting the LookAndFeel of the PropertyPanel to V2 works fine. Are you sure you’re not changing the LookAndFeel anywhere else?

Thanks for looking into it Ed. I’ll dig a little deeper and see. I was just surprised that my application would change look and feel at all following a simple version update.

LookAndFeel_V4 is now the default but you can change it using the Dekstop::setDefaultLookAndFeel() method. So somewhere in your application initialisation code you’d do:

Desktop::getInstance().setDefaultLookAndFeel (v2);

Where v2 is a ScopedPointer to a LookAndFeel_V2 instance. This should then use V2 as the default for your GUI

That’s a neat trick! Should help a lot.

[edit] Thanks Ed, that did the job.

1 Like