@@ -59,7 +59,7 @@ TextLayout DemoLookAndFeel::layoutTooltipText (const String& text, Colour textCo
5959
6060 AttributedString s;
6161 s.setJustification (Justification::topLeft);
62- s.append (text, Font (tooltipFontSize), textColour);
62+ s.append (text, Font (FontOptions ( tooltipFontSize) ), textColour);
6363
6464 TextLayout tl;
6565 tl.createLayoutWithBalancedLineLengths (s, (float ) maxTooltipWidth);
@@ -142,7 +142,7 @@ void DemoLookAndFeel::drawMenuBarItem (Graphics& g, int width, int height,
142142// ==============================================================================
143143int DemoLookAndFeel::getTabButtonBestWidth (TabBarButton& button, int tabDepth)
144144{
145- auto width = Font (( float ) tabDepth).getStringWidth (button.getButtonText ().trim ())
145+ auto width = Font (FontOptions (( float ) tabDepth) ).getStringWidth (button.getButtonText ().trim ())
146146 + getTabButtonOverlap (tabDepth) * 2 ;
147147
148148 if (auto * extraComponent = button.getExtraComponent ())
@@ -368,7 +368,7 @@ void DemoLookAndFeel::drawComboBox (Graphics& g, int width, int height, bool isB
368368
369369Font DemoLookAndFeel::getTextButtonFont (TextButton&, int )
370370{
371- return { defaultFontHeight } ;
371+ return FontOptions ( defaultFontHeight) ;
372372}
373373
374374void DemoLookAndFeel::drawButtonBackground (Graphics& g, Button& button, const Colour& backgroundColour,
@@ -472,7 +472,7 @@ void DemoLookAndFeel::changeToggleButtonWidthToFitText (ToggleButton& button)
472472 const auto fontSize = defaultFontHeight;
473473 const auto tickWidth = fontSize * 1 .1f ;
474474
475- button.setSize (roundToIntAccurate (Font (fontSize).getStringWidthFloat (button.getButtonText ()) + tickWidth + defaultFontHeight),
475+ button.setSize (roundToIntAccurate (Font (FontOptions ( fontSize) ).getStringWidthFloat (button.getButtonText ()) + tickWidth + defaultFontHeight),
476476 button.getHeight ());
477477}
478478
0 commit comments