From e09d1226baf5c3164effd234c693eacb4c97d710 Mon Sep 17 00:00:00 2001 From: EvilDragon Date: Sat, 28 Sep 2024 16:14:50 +0200 Subject: [PATCH] Fix MSEG horizontal ruler text issue (#7806) --- 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,