diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp index 200725283e..9263072345 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp @@ -225,10 +225,13 @@ void LookAndFeel_V3::drawTabButton (TabBarButton& button, Graphics& g, bool isMo if (TabbedButtonBar* bar = button.findParentComponentOfClass()) { - if (button.isFrontTab() && bar->isColourSpecified (TabbedButtonBar::frontTextColourId)) - col = bar->findColour (TabbedButtonBar::frontTextColourId); - else if (bar->isColourSpecified (TabbedButtonBar::tabTextColourId)) - col = bar->findColour (TabbedButtonBar::tabTextColourId); + TabbedButtonBar::ColourIds colID = button.isFrontTab() ? TabbedButtonBar::frontTextColourId + : TabbedButtonBar::tabTextColourId; + + if (bar->isColourSpecified (colID)) + col = bar->findColour (colID); + else if (isColourSpecified (colID)) + col = findColour (colID); } const Rectangle area (button.getTextArea().toFloat());