sudara / melatonin_inspector

A JUCE module that gives you the ability to inspect and visually edit (non-destructively) components in your UI.
MIT License
145 stars 17 forks source link

Handle JUCE 8.0.2 deprecating `Font::getStringWidth()` #124

Closed ImJimmi closed 1 week ago

ImJimmi commented 1 week ago

JUCE deprecated Font::getStringWidth() in v8.0.2, which was used in a few places across the inspector.

This adds a new getStringWidth() static method to InspectorLookAndFeel which uses juce::GlyphArrangement to calculate the string width in JUCE 8.0.2 or newer, keeping backwards-compatibility for older versions of JUCE.

sudara commented 1 week ago

Thanks! I'll take a look tomorrow and merge.

sudara commented 1 week ago

The CI errors are fixed in #125, which needs this merged as well, so will merge this first.