diff --git a/modules/gui/chowdsp_gui/PluginComponents/chowdsp_InfoComp.cpp b/modules/gui/chowdsp_gui/PluginComponents/chowdsp_InfoComp.cpp index c0605256..04bbc73a 100644 --- a/modules/gui/chowdsp_gui/PluginComponents/chowdsp_InfoComp.cpp +++ b/modules/gui/chowdsp_gui/PluginComponents/chowdsp_InfoComp.cpp @@ -23,7 +23,9 @@ void InfoComp::paint (juce::Graphics& g) const auto defaultFont = juce::jmin (20.0f, (float) getHeight()); g.setFont (defaultFont); + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") auto fw = g.getCurrentFont().getStringWidthFloat (totalStr); + JUCE_END_IGNORE_WARNINGS_GCC_LIKE if (fw > width) { float s = width / fw; @@ -35,7 +37,9 @@ void InfoComp::paint (juce::Graphics& g) auto drawText = [&font, &g, &b] (const juce::String& text) { + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") auto w = font.getStringWidth (text); + JUCE_END_IGNORE_WARNINGS_GCC_LIKE g.drawFittedText (text, b.removeFromLeft (w), juce::Justification::left, 1); }; diff --git a/modules/gui/chowdsp_gui/PluginComponents/chowdsp_ParametersView.cpp b/modules/gui/chowdsp_gui/PluginComponents/chowdsp_ParametersView.cpp index 98df51cb..340a5de9 100644 --- a/modules/gui/chowdsp_gui/PluginComponents/chowdsp_ParametersView.cpp +++ b/modules/gui/chowdsp_gui/PluginComponents/chowdsp_ParametersView.cpp @@ -100,7 +100,9 @@ namespace parameters_view_detail parameterName.setBounds (area.removeFromLeft (parameterName .getFont() + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") .getStringWidth (parameterName.getText()) + JUCE_END_IGNORE_WARNINGS_GCC_LIKE * 11 / 10)); parameterComp->setBounds (area); } diff --git a/modules/gui/chowdsp_gui/PluginComponents/chowdsp_TitleComp.cpp b/modules/gui/chowdsp_gui/PluginComponents/chowdsp_TitleComp.cpp index b7117e3a..dabbd2c1 100644 --- a/modules/gui/chowdsp_gui/PluginComponents/chowdsp_TitleComp.cpp +++ b/modules/gui/chowdsp_gui/PluginComponents/chowdsp_TitleComp.cpp @@ -20,7 +20,9 @@ void TitleComp::paint (juce::Graphics& g) auto drawText = [&curFont, &g, &b] (const juce::String& text) { + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") auto width = curFont.getStringWidth (text); + JUCE_END_IGNORE_WARNINGS_GCC_LIKE g.drawFittedText (text, b.removeFromLeft (width), juce::Justification::left, 1); }; diff --git a/modules/gui/chowdsp_gui/PluginComponents/chowdsp_TooltipComp.cpp b/modules/gui/chowdsp_gui/PluginComponents/chowdsp_TooltipComp.cpp index 4d4418ef..15b3481c 100644 --- a/modules/gui/chowdsp_gui/PluginComponents/chowdsp_TooltipComp.cpp +++ b/modules/gui/chowdsp_gui/PluginComponents/chowdsp_TooltipComp.cpp @@ -32,8 +32,10 @@ void TooltipComponent::paint (juce::Graphics& g) auto whitespace = juce::String(); auto font = g.getCurrentFont(); + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") while (font.getStringWidth (whitespace) < font.getStringWidth (name + ": ")) whitespace += " "; + JUCE_END_IGNORE_WARNINGS_GCC_LIKE g.setColour (findColour (textColourID)); g.drawMultiLineText (whitespace + tip, b.getX(), b.getY() + (int) font.getHeight() - 3, b.getWidth(), juce::Justification::topLeft);