1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Better colour lookup in LookAndFeel_V3::drawTabButton

This commit is contained in:
jules 2014-04-10 21:31:35 +01:00
parent 4a0c5173e9
commit 589f20e829

View file

@ -225,10 +225,13 @@ void LookAndFeel_V3::drawTabButton (TabBarButton& button, Graphics& g, bool isMo
if (TabbedButtonBar* bar = button.findParentComponentOfClass<TabbedButtonBar>())
{
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<float> area (button.getTextArea().toFloat());