tabbedComponent and tabTextColourId not following component LookAndFee

Hi,
I have some trouble having the tabTextColourId of the TabbedButtonBar on a tabbedComponent following the general lookandfeel colour scheme.

at first everything is painted correctly. The different elements get their right colour.
When I change the global colour scheme, the tabs’ background colour are changing but the tabs’ texts are not.

CtrlrPanelProperties::CtrlrPanelProperties (CtrlrPanelEditor &_owner)
    : Component (L"Properties"),
      owner(_owner),
      tabbedComponent (0)
{
    addAndMakeVisible (tabbedComponent = new TabbedComponent (TabbedButtonBar::TabsAtRight));
        
    tabbedComponent->setTabBarDepth (owner.getOwner().getOwner().getProperty(Ids::ctrlrTabBarDepth));
    tabbedComponent->setCurrentTabIndex (-1);
    tabbedComponent->setOutline (0);
    tabbedComponent->getTabbedButtonBar().setColour(TabbedButtonBar::tabTextColourId, findColour(TabbedButtonBar::tabTextColourId));
    tabbedComponent->getTabbedButtonBar().setColour(TabbedButtonBar::frontTextColourId, findColour(TabbedButtonBar::frontTextColourId));
    
	CtrlrPanelComponentProperties *props = new CtrlrPanelComponentProperties (owner);
    
	tabbedComponent->addTab ("General",
                             findColour(TabbedComponent::backgroundColourId), 
                             props,
                             true
                             );
    
    tabbedComponent->addTab ("Resources",
                             findColour(TabbedComponent::backgroundColourId),
                             new CtrlrPanelResourceEditor(owner),
                             true
                             );
    
	tabbedComponent->addTab ("Utility",
                             findColour(TabbedComponent::backgroundColourId), 
                             new CtrlrPanelUtilities(owner),
                             true
                             );

	ctrlrPanelFindProperty.reset(new CtrlrPanelFindProperty(owner, props));
	addAndMakeVisible(ctrlrPanelFindProperty.get());
	setSize (216, 364);
}

Can you please help with that? I don’t understand why the background colour is updated but not the texts.
Thanks in advance
Damien

For anyone interested, I noticed that TabbedButtonBar::tabTextColourId and TabbedButtonBar::frontTextColourId are not specified in JUCE 6 so you won’t get light colours on dark stock colourschemes but always plain black. Not good for dark on dark…

The best is to go with another colour definition from label or slider ColourIds :

tabbedComponent->getTabbedButtonBar().setColour(TabbedButtonBar::frontTextColourId, findColour(Label::textColourId)); 
tabbedComponent->getTabbedButtonBar().setColour(TabbedButtonBar::tabTextColourId, findColour(Label::textColourId).withAlpha(0.6f));
tabbedComponent->getTabbedButtonBar().setColour(TabbedButtonBar::tabOutlineColourId, findColour(Slider::textBoxOutlineColourId));

Enjoy :wink: