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:
parent
4a0c5173e9
commit
589f20e829
1 changed files with 7 additions and 4 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue