Skip to content

Commit 5bd45ad

Browse files
authored
Bump JUCE to 8.0.13 (#171)
* Bump JUCE to 8.0.13 * Replace deprecated Font ctors with FontOptions and GlyphArrangement::getStringWidthInt * Use createEditorAndMakeActive and call editorBeingDeleted on teardown * CI: test dependency builds against JUCE 8.0.13 only
1 parent 46802d5 commit 5bd45ad

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

‎.github/workflows/build.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ jobs:
175175
fail-fast: false
176176
matrix:
177177
os: [ubuntu-latest, macos-15, windows-latest]
178-
juce: ["8.0.3", "8.0.11"]
178+
juce: ["8.0.13"]
179179
runs-on: ${{ matrix.os }}
180180
steps:
181181
- uses: actions/checkout@v4

‎CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ endif()
6868

6969
# Only fetch JUCE when top-level (when used as dependency, JUCE is already available)
7070
if (pluginval_IS_TOP_LEVEL)
71-
CPMAddPackage("gh:juce-framework/juce#8.0.3")
71+
CPMAddPackage("gh:juce-framework/juce#8.0.13")
7272
endif()
7373

7474

‎Source/PluginvalLookAndFeel.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,24 +215,24 @@ class PluginvalLookAndFeel : public juce::LookAndFeel_V4
215215
auto textColour = button.isFrontTab() ? findColour (juce::Label::textColourId)
216216
: findColour (juce::Label::textColourId).withAlpha (0.6f);
217217
g.setColour (textColour);
218-
g.setFont (juce::Font (14.0f));
218+
g.setFont (juce::Font (juce::FontOptions (14.0f)));
219219
g.drawText (button.getButtonText(), area.reduced (12.0f, 0.0f), juce::Justification::centred);
220220
}
221221

222222
int getTabButtonBestWidth (juce::TabBarButton& button, int tabDepth) override
223223
{
224-
auto width = juce::Font (14.0f).getStringWidth (button.getButtonText()) + 40; // Extra padding
224+
auto width = juce::GlyphArrangement::getStringWidthInt (juce::Font (juce::FontOptions (14.0f)), button.getButtonText()) + 40; // Extra padding
225225
return juce::jmax (width, 80);
226226
}
227227

228228
juce::Font getTextButtonFont (juce::TextButton&, int buttonHeight) override
229229
{
230-
return juce::Font (juce::jmin (14.0f, (float) buttonHeight * 0.6f));
230+
return juce::Font (juce::FontOptions (juce::jmin (14.0f, (float) buttonHeight * 0.6f)));
231231
}
232232

233233
juce::Font getLabelFont (juce::Label&) override
234234
{
235-
return juce::Font (14.0f);
235+
return juce::Font (juce::FontOptions (14.0f));
236236
}
237237

238238
void drawTableHeaderColumn (juce::Graphics& g, juce::TableHeaderComponent& header,

‎Source/TestUtilities.h‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static std::unique_ptr<juce::AudioProcessorEditor> createAndShowEditorOnMessageT
145145
return {};
146146

147147
jassert (instance.getActiveEditor() == nullptr);
148-
editor.reset (instance.createEditor());
148+
editor.reset (instance.createEditorAndMakeActive());
149149

150150
if (editor)
151151
{
@@ -177,13 +177,16 @@ static void deleteEditorOnMessageThread (std::unique_ptr<juce::AudioProcessorEdi
177177
{
178178
if (juce::MessageManager::getInstance()->isThisTheMessageThread())
179179
{
180+
editor->processor.editorBeingDeleted (editor.get());
180181
editor.reset();
181182
return;
182183
}
183184

184185
juce::WaitableEvent waiter;
185186
juce::MessageManager::callAsync ([&]
186187
{
188+
if (editor != nullptr)
189+
editor->processor.editorBeingDeleted (editor.get());
187190
editor.reset();
188191
waiter.signal();
189192
});

0 commit comments

Comments
 (0)