mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Font: Deprecate old Font constructors
This commit is contained in:
parent
2ed9b84070
commit
4f2c287f9b
95 changed files with 428 additions and 209 deletions
|
|
@ -82,7 +82,7 @@ static void drawTextLayout (Graphics& g, Component& owner, StringRef text, const
|
|||
|
||||
AttributedString attributedString { text };
|
||||
attributedString.setColour (textColour);
|
||||
attributedString.setFont ((float) textBounds.getHeight() * 0.6f);
|
||||
attributedString.setFont (FontOptions { (float) textBounds.getHeight() * 0.6f });
|
||||
attributedString.setJustification (Justification::centredLeft);
|
||||
attributedString.setWordWrap (AttributedString::WordWrap::none);
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ void MPEKeyboardComponent::drawWhiteKey (int midiNoteNumber, Graphics& g, Rectan
|
|||
auto text = MidiMessage::getMidiNoteName (midiNoteNumber, true, true, getOctaveForMiddleC());
|
||||
|
||||
g.setColour (findColour (textLabelColourId));
|
||||
g.setFont (Font (fontHeight).withHorizontalScale (0.8f));
|
||||
g.setFont (Font (FontOptions { fontHeight }).withHorizontalScale (0.8f));
|
||||
|
||||
switch (getOrientation())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ void MidiKeyboardComponent::drawWhiteNote (int midiNoteNumber, Graphics& g, Rect
|
|||
auto fontHeight = jmin (12.0f, getKeyWidth() * 0.9f);
|
||||
|
||||
g.setColour (textColour);
|
||||
g.setFont (Font (fontHeight).withHorizontalScale (0.8f));
|
||||
g.setFont (Font (FontOptions { fontHeight }).withHorizontalScale (0.8f));
|
||||
|
||||
switch (currentOrientation)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue