From f38586f402d00b51c340391e16501dcd77acac1c Mon Sep 17 00:00:00 2001 From: Vincenzo Sicurella Date: Tue, 4 Jun 2024 00:53:30 -0400 Subject: [PATCH] fix some font style issues --- Source/LumatoneEditorLookAndFeel.h | 2 +- Source/LumatoneEditorStyleCommon.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/LumatoneEditorLookAndFeel.h b/Source/LumatoneEditorLookAndFeel.h index 50115ef..b618e99 100644 --- a/Source/LumatoneEditorLookAndFeel.h +++ b/Source/LumatoneEditorLookAndFeel.h @@ -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) { diff --git a/Source/LumatoneEditorStyleCommon.h b/Source/LumatoneEditorStyleCommon.h index 4686086..51a560e 100644 --- a/Source/LumatoneEditorStyleCommon.h +++ b/Source/LumatoneEditorStyleCommon.h @@ -322,8 +322,8 @@ static void addArcToPath(Path& pathIn, Rectangle& 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 = "_") @@ -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)); }