Skip to content

Commit

Permalink
fix some font style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vsicurella committed Jun 4, 2024
1 parent 8d8ac4f commit f38586f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Source/LumatoneEditorLookAndFeel.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class LumatoneEditorLookAndFeel : public LookAndFeel_V4
return getComboBoxFont(*comboBox);
}

Font font = l.getFont().withHeight(l.getHeight());
Font font = l.getFont();//.withHeight(l.getHeight());

if (parent)
{
Expand Down
6 changes: 3 additions & 3 deletions Source/LumatoneEditorStyleCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ static void addArcToPath(Path& pathIn, Rectangle<float>& ellipseBounds, float fr

static void resizeLabelWithHeight(Label* label, int height, float fontHeightScalar = 1.0f, String textSuffix = "_")
{
label->setFont(label->getFont().withHeight(height * fontHeightScalar * GLOBALFONTSCALAR));
label->setSize(round(label->getFont().getStringWidthFloat(label->getText() + textSuffix)), height);
label->setFont(label->getFont().withHeight(height * fontHeightScalar));
label->setSize(roundToInt(label->getFont().getStringWidthFloat(label->getText() + textSuffix)), height);
}

//static void positionLabelWithHeight(Label* label, int xPosition, int yPosition, int height, float fontHeightScalar = 1.0f, String textSuffix = "_")
Expand All @@ -338,7 +338,7 @@ static void resizeLabelWithHeight(Label* label, int height, float fontHeightScal
static void resizeLabelWithWidth(Label* label, int width, float fontHeightScalar = 1.0f)
{
float heightOverWidth = label->getFont().getHeight() / label->getFont().getStringWidthFloat(label->getText());
label->setSize(width, round(heightOverWidth * width));
label->setSize(width, roundToInt(heightOverWidth * width));
label->setFont(label->getFont().withHeight(label->getHeight() * fontHeightScalar * GLOBALFONTSCALAR));
}

Expand Down

0 comments on commit f38586f

Please sign in to comment.