[Previous subject: In JUCE 9, plugin windows no longer change size when I change my scaleFactor, but the content does]
I have a scaleFactor menu setting in my plugin, i.e. 100%, 150%, 200% (1.0f, 1.5f, 2.0f).
Since updating to JUCE 9.0.5 (from JUCE 8.x), and rebuilding the AudioPluginHost, changing the scaleFactor on the plugin no longer resizes the plugin window - it only changes the zoom on the content.
What has changed on the scaling side?
The way I do scaling is I have my MainComponent inside a Wrapper (which is the AudioProcessorEditor). The MainComponent gets a Transform set on it to change the scale, while the AudioProcessorEditor’s size is changed.. In the past, this would automatically resize the plugin window, worked flawlessly, but it doesn’t anymore.
That’s weird. It starts working again if I call AudioProcessorEditor::setResizable(true, false).
I have never had to set my plugin to be resizable before.
I just want to choose from one of several preset scaling factors - which always worked before.
I don’t want the user to be able to resize it by dragging, but now you can drag the corner and sides, which doesn’t scale my content but just reveals black empty space.
Perhaps you can do something with this->resizableCorner of the editor? I have fully customized the re-sizing corner in plugins in such way. I would guess you could hide it & let it ignore mouse event similarly.
the resizable corner is already hidden when you specify false for the second arg of setResizable(). But you still get the resizing arrows when you hold the mouse above the edges or the corner.
I want to set the size procedurally like I always have, while not allowing any hint of being able to drag the edges.
I’d like to confirm from the team that this is some sort of change in JUCE 9? @reuk@anthony-nicholls
Sorry, I mean you specify the second arg of setResizable() as true and delibrately hide the corner by setVisible(false). I have just tried this and the resizing arrows do not appear, as expect.
the resizing arrows appear whether the corner is visible or not. This is an OS thing. Even away from the corner. Hold the mouse over the right edge, you get a horizontal arrow. Hold the mouse over the bottom edge, you get a vertical arrow.