From a5cf35d875fa3ae0d9024776f2218cafc3ef9472 Mon Sep 17 00:00:00 2001 From: Mario Kruselj Date: Sat, 28 Sep 2024 16:03:56 +0200 Subject: [PATCH] Fix MSEG horizontal ruler text issue --- src/surge-xt/gui/overlays/MSEGEditor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/surge-xt/gui/overlays/MSEGEditor.cpp b/src/surge-xt/gui/overlays/MSEGEditor.cpp index ad9d5e10ff5..753299e210a 100644 --- a/src/surge-xt/gui/overlays/MSEGEditor.cpp +++ b/src/surge-xt/gui/overlays/MSEGEditor.cpp @@ -858,21 +858,21 @@ struct MSEGCanvas : public juce::Component, public Surge::GUI::SkinConsumingComp if (!(c & TickDrawStyle::kNoLabel)) { - auto sw = 0.f; + int sw = 0; if (fmod(t, 1.f) == 0.f) { g.setColour(skin->getColor(Colors::MSEGEditor::Axis::Text)); g.setFont(primaryFont); txt = fmt::format("{:d}", int(t)); - sw = juce::GlyphArrangement::getStringWidth(primaryFont, txt); + sw = juce::GlyphArrangement::getStringWidthInt(primaryFont, txt); } else { g.setColour(skin->getColor(Colors::MSEGEditor::Axis::SecondaryText)); g.setFont(secondaryFont); txt = fmt::format("{:5.2f}", t); - sw = juce::GlyphArrangement::getStringWidth(secondaryFont, txt); + sw = juce::GlyphArrangement::getStringWidthInt(secondaryFont, txt); } g.drawText(txt, px - (sw / 2), haxisArea.getY() + 2, sw, yofs,