ListBox ColourIds

Hi Jules,

How about adding a textColourId to the ListBox::ColourIds and replacing

g.setColour (Colours::black.withAlpha (enabled ? 1.0f : 0.6f));


g.setColour(findColour(textColourId, true).withAlpha (enabled ? 1.0f : 0.6f));

in AudioDeviceSelectorComponentListbox::paintListBoxItem?

I’m asking this because the application I’m working on has a special lookandfeel that overrides various background colourIds (including ListBox::backgroundColourId) to black.

And black on black text doesn’t look too good in the AudioDeviceSelector :slight_smile:


Sounds like a reasonable request!


Btw, I was wondering:

What’s the rationale behind ColourIds numbering scheme?

I couldn’t find anything in the documentation about it, and I’d like to add a couple of colour ids for my custom application components, and register them in my custom lookandfeel without conflicting with standard components ones. Is there anything like a user-reserved range?

It’s more or less random, though for a user colour, any low number below about 0x1000 will be fine, as all mine are above that.