This is a convoluted question - but the LookAndFeel stuff is so convoluted…
I am using a TabbedComponent to manage different pages. Would like to have control over the font in the tabs.
In LookAndFeel_V2 we have the function getTabButtonFont() - similar to the getXXXFont() functions for most components.
However, in LookAndFeel_V3, the use of this is totally discarded in favor of a function createTabTextLayout() which is declared static for some reason:
static void createTabTextLayout (const TabBarButton& button, float length, float depth, Colour colour, TextLayout&);
LookAndFeel_V3 then overrides drawTabButton() in order to call this new function createTabTextLayout(), and ignore the use of getTabButtonFont():
void LookAndFeel_V3::drawTabButton (TabBarButton& button, Graphics& g, bool isMouseOver, bool isMouseDown)
{
[...]
TextLayout textLayout;
createTabTextLayout (button, length, depth, col, textLayout);
[...]
}
So, if you are sub-classing LookAndFeel_V4, you cannot use getTabButtonFont() to change the font of the TabbedComponent.
OK, so I try an override of createTabTextLayout(). It is never called. Is that because it is declared static? Or non-virtual?
I must needlessly also override drawTabButton() in order to get to createTabTextLayout(). Why?
And why would the original V2 function getTabButtonFont() be discarded in V3? Couldn’t that have been used inside createTabTextLayout()?
