| @@ -311,6 +311,7 @@ public: | |||||
| virtual Rectangle<int> getTabButtonExtraComponentBounds (const TabBarButton&, Rectangle<int>& textArea, Component& extraComp) = 0; | virtual Rectangle<int> getTabButtonExtraComponentBounds (const TabBarButton&, Rectangle<int>& textArea, Component& extraComp) = 0; | ||||
| virtual void drawTabButton (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown) = 0; | virtual void drawTabButton (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown) = 0; | ||||
| virtual Font getTabButtonFont (TabBarButton&, float height) = 0; | |||||
| virtual void drawTabButtonText (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown) = 0; | virtual void drawTabButtonText (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown) = 0; | ||||
| virtual void drawTabbedButtonBarBackground (TabbedButtonBar&, Graphics&) = 0; | virtual void drawTabbedButtonBarBackground (TabbedButtonBar&, Graphics&) = 0; | ||||
| virtual void drawTabAreaBehindFrontButton (TabbedButtonBar&, Graphics&, int w, int h) = 0; | virtual void drawTabAreaBehindFrontButton (TabbedButtonBar&, Graphics&, int w, int h) = 0; | ||||
| @@ -2171,6 +2171,11 @@ void LookAndFeel_V2::fillTabButtonShape (TabBarButton& button, Graphics& g, cons | |||||
| g.strokePath (path, PathStrokeType (isFrontTab ? 1.0f : 0.5f)); | g.strokePath (path, PathStrokeType (isFrontTab ? 1.0f : 0.5f)); | ||||
| } | } | ||||
| Font LookAndFeel_V2::getTabButtonFont (TabBarButton&, float height) | |||||
| { | |||||
| return { height * 0.6f }; | |||||
| } | |||||
| void LookAndFeel_V2::drawTabButtonText (TabBarButton& button, Graphics& g, bool isMouseOver, bool isMouseDown) | void LookAndFeel_V2::drawTabButtonText (TabBarButton& button, Graphics& g, bool isMouseOver, bool isMouseDown) | ||||
| { | { | ||||
| const Rectangle<float> area (button.getTextArea().toFloat()); | const Rectangle<float> area (button.getTextArea().toFloat()); | ||||
| @@ -2181,7 +2186,7 @@ void LookAndFeel_V2::drawTabButtonText (TabBarButton& button, Graphics& g, bool | |||||
| if (button.getTabbedButtonBar().isVertical()) | if (button.getTabbedButtonBar().isVertical()) | ||||
| std::swap (length, depth); | std::swap (length, depth); | ||||
| Font font (depth * 0.6f); | |||||
| Font font (getTabButtonFont (button, depth)); | |||||
| font.setUnderline (button.hasKeyboardFocus (false)); | font.setUnderline (button.hasKeyboardFocus (false)); | ||||
| AffineTransform t; | AffineTransform t; | ||||
| @@ -274,6 +274,7 @@ public: | |||||
| Rectangle<int> getTabButtonExtraComponentBounds (const TabBarButton&, Rectangle<int>& textArea, Component& extraComp) override; | Rectangle<int> getTabButtonExtraComponentBounds (const TabBarButton&, Rectangle<int>& textArea, Component& extraComp) override; | ||||
| void drawTabButton (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown) override; | void drawTabButton (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown) override; | ||||
| Font getTabButtonFont (TabBarButton&, float height) override; | |||||
| void drawTabButtonText (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown) override; | void drawTabButtonText (TabBarButton&, Graphics&, bool isMouseOver, bool isMouseDown) override; | ||||
| void drawTabbedButtonBarBackground (TabbedButtonBar&, Graphics&) override; | void drawTabbedButtonBarBackground (TabbedButtonBar&, Graphics&) override; | ||||
| void drawTabAreaBehindFrontButton (TabbedButtonBar&, Graphics&, int w, int h) override; | void drawTabAreaBehindFrontButton (TabbedButtonBar&, Graphics&, int w, int h) override; | ||||