1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Font: Deprecate old Font constructors

This commit is contained in:
reuk 2024-03-19 20:32:19 +00:00
parent 2ed9b84070
commit 4f2c287f9b
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
95 changed files with 428 additions and 209 deletions

View file

@ -50,7 +50,7 @@ public:
icon (makeIcon (iconSvgData))
{
addAndMakeVisible (nameLabel);
nameLabel.setFont (18.0f);
nameLabel.setFont (FontOptions { 18.0f });
nameLabel.setMinimumHorizontalScale (1.0f);
addAndMakeVisible (descriptionLabel);

View file

@ -73,13 +73,13 @@ public:
addAndMakeVisible (userAvatar);
addAndMakeVisible (createAccountLabel);
createAccountLabel.setFont (Font (14.0f, Font::underlined));
createAccountLabel.setFont (FontOptions (14.0f, Font::underlined));
createAccountLabel.addMouseListener (this, false);
createAccountLabel.setMouseCursor (MouseCursor::PointingHandCursor);
addAndMakeVisible (errorMessageLabel);
errorMessageLabel.setMinimumHorizontalScale (1.0f);
errorMessageLabel.setFont (12.0f);
errorMessageLabel.setFont (FontOptions { 12.0f });
errorMessageLabel.setColour (Label::textColourId, Colours::red);
errorMessageLabel.setVisible (false);
@ -119,8 +119,8 @@ public:
passwordBox.setBounds (bounds.removeFromTop (textEditorHeight));
bounds.removeFromTop (spacing * 2);
emailBox.setFont (Font ((float) textEditorHeight / 2.5f));
passwordBox.setFont (Font ((float) textEditorHeight / 2.5f));
emailBox.setFont (FontOptions ((float) textEditorHeight / 2.5f));
passwordBox.setFont (FontOptions ((float) textEditorHeight / 2.5f));
logInButton.setBounds (bounds.removeFromTop (textEditorHeight));

View file

@ -43,7 +43,7 @@ public:
{
addAndMakeVisible (titleLabel);
titleLabel.setJustificationType (Justification::centred);
titleLabel.setFont (Font (35.0f, Font::FontStyleFlags::bold));
titleLabel.setFont (FontOptions (35.0f, Font::FontStyleFlags::bold));
auto buildDate = Time::getCompilationDate();
addAndMakeVisible (versionLabel);

View file

@ -116,7 +116,7 @@ private:
// This is unfortunately a bit slow, but will work on all platforms.
static bool isMonospacedTypeface (const String& name)
{
const Font font (name, 20.0f, Font::plain);
const Font font = FontOptions (name, 20.0f, Font::plain);
const auto width = font.getStringWidth ("....");
@ -188,7 +188,7 @@ private:
PropertyPanel panel;
TextButton loadButton, saveButton;
Font codeFont;
Font codeFont { FontOptions{} };
Array<var> colourValues;
void saveScheme (bool isExit)

View file

@ -139,17 +139,17 @@ public:
UpdateDialog (const String& newVersion, const String& releaseNotes)
{
titleLabel.setText ("JUCE version " + newVersion, dontSendNotification);
titleLabel.setFont ({ 15.0f, Font::bold });
titleLabel.setFont (FontOptions { 15.0f, Font::bold });
titleLabel.setJustificationType (Justification::centred);
addAndMakeVisible (titleLabel);
contentLabel.setText ("A new version of JUCE is available - would you like to download it?", dontSendNotification);
contentLabel.setFont (15.0f);
contentLabel.setFont (FontOptions { 15.0f });
contentLabel.setJustificationType (Justification::topLeft);
addAndMakeVisible (contentLabel);
releaseNotesLabel.setText ("Release notes:", dontSendNotification);
releaseNotesLabel.setFont (15.0f);
releaseNotesLabel.setFont (FontOptions { 15.0f });
releaseNotesLabel.setJustificationType (Justification::topLeft);
addAndMakeVisible (releaseNotesLabel);