mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
LookAndFeel: Allow specifying a default typeface metrics kind to use
This commit is contained in:
parent
fa81badb30
commit
4533077b75
26 changed files with 82 additions and 60 deletions
|
|
@ -250,9 +250,10 @@ void OnlineUnlockForm::resized()
|
|||
r.removeFromBottom (20);
|
||||
|
||||
// (force use of a default system font to make sure it has the password blob character)
|
||||
Font font (FontOptions { Font::getDefaultTypefaceForFont (FontOptions (Font::getDefaultSansSerifFontName(),
|
||||
Font::getDefaultStyle(),
|
||||
5.0f)) });
|
||||
const auto typeface = Font::getDefaultTypefaceForFont (FontOptions (Font::getDefaultSansSerifFontName(),
|
||||
Font::getDefaultStyle(),
|
||||
5.0f));
|
||||
Font font (withDefaultMetrics (FontOptions { typeface }));
|
||||
|
||||
const int boxHeight = 24;
|
||||
passwordBox.setBounds (r.removeFromBottom (boxHeight));
|
||||
|
|
@ -286,7 +287,7 @@ void OnlineUnlockForm::showBubbleMessage (const String& text, Component& target)
|
|||
addChildComponent (bubble.get());
|
||||
|
||||
AttributedString attString;
|
||||
attString.append (text, FontOptions (16.0f));
|
||||
attString.append (text, withDefaultMetrics (FontOptions (16.0f)));
|
||||
|
||||
bubble->showAt (getLocalArea (&target, target.getLocalBounds()),
|
||||
attString, 500, // numMillisecondsBeforeRemoving
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue