BubbleMessageComponent text colour

BubbleMessageComponent does

void BubbleMessageComponent::paintContent (Graphics& g, int w, int h)
{
    g.setColour (findColour (TooltipWindow::textColourId));

except that it won’t use this colour as it uses the colour in the TextLayout

Similar issue that was fixed here

Given that showAt takes an AttributedString, it might be surprising (and may cause existing UIs to render incorrectly) if the component overrode the colour set on this string. That being said, it does look like this was the original intention…

The AlertWindow case is a bit different, because the interface only accepts String instances, so it’s completely reasonable to expect the box to render text using colours set in its LnF.

In the absense of a really compelling argument to modify BubbleMessageComponent, I think I’d recommend writing a tiny function which wraps BubbleMessageComponent::showAt and which internally constructs an AttributedString of an appropriate colour.

yep, probably just need to clean the paintContent func.
At first, in order to know how the component worked, I checked the paintContent content and didn’t understand why my manual set of TooltipWindow::textColourId wasn’t working.
I didn’t remember that attributed string allowed to set the colour