@@ -59,7 +59,7 @@ TextLayout DemoLookAndFeel::layoutTooltipText (const String& text, Colour textCo
59
59
60
60
AttributedString s;
61
61
s.setJustification (Justification::topLeft);
62
- s.append (text, Font (tooltipFontSize), textColour);
62
+ s.append (text, Font (FontOptions ( tooltipFontSize) ), textColour);
63
63
64
64
TextLayout tl;
65
65
tl.createLayoutWithBalancedLineLengths (s, (float ) maxTooltipWidth);
@@ -142,7 +142,7 @@ void DemoLookAndFeel::drawMenuBarItem (Graphics& g, int width, int height,
142
142
// ==============================================================================
143
143
int DemoLookAndFeel::getTabButtonBestWidth (TabBarButton& button, int tabDepth)
144
144
{
145
- auto width = Font (( float ) tabDepth).getStringWidth (button.getButtonText ().trim ())
145
+ auto width = Font (FontOptions (( float ) tabDepth) ).getStringWidth (button.getButtonText ().trim ())
146
146
+ getTabButtonOverlap (tabDepth) * 2 ;
147
147
148
148
if (auto * extraComponent = button.getExtraComponent ())
@@ -368,7 +368,7 @@ void DemoLookAndFeel::drawComboBox (Graphics& g, int width, int height, bool isB
368
368
369
369
Font DemoLookAndFeel::getTextButtonFont (TextButton&, int )
370
370
{
371
- return { defaultFontHeight } ;
371
+ return FontOptions ( defaultFontHeight) ;
372
372
}
373
373
374
374
void DemoLookAndFeel::drawButtonBackground (Graphics& g, Button& button, const Colour& backgroundColour,
@@ -472,7 +472,7 @@ void DemoLookAndFeel::changeToggleButtonWidthToFitText (ToggleButton& button)
472
472
const auto fontSize = defaultFontHeight;
473
473
const auto tickWidth = fontSize * 1 .1f ;
474
474
475
- button.setSize (roundToIntAccurate (Font (fontSize).getStringWidthFloat (button.getButtonText ()) + tickWidth + defaultFontHeight),
475
+ button.setSize (roundToIntAccurate (Font (FontOptions ( fontSize) ).getStringWidthFloat (button.getButtonText ()) + tickWidth + defaultFontHeight),
476
476
button.getHeight ());
477
477
}
478
478
0 commit comments