I am trying to have my plugin resizable. My requirements seem modest:
Give the user the possibility to resize my plugin by dragging
impose a fixed ratio, mininmal and maximal dimensions
work reliable with win10 & mac as VST3 and AU on the usual hosts
My question is not about how to handle the layout and drawing, my question is on setting it up such that my plugin editor receives the information about resize and allows constraining it, without ugly black borders between my plugin and the window containing it.
I thought this is simple problem … however, it turned out to be tough. I also found dozens of posts in the forum where people reported similar problems again and again. Also the AudioPluginDemo suffers from all kind of resize issues, eg with VST3 on WIN10 in Ableton: you can resize the outer frame such that you get ugly black border, or you shrink the outer window and “cut” the plugin area short, because it does not get the resize events.
Obviously I am doing something wrong, and obviously there must be a solution for this … so can anyone help me?
Are you using the very latest version of JUCE from the develop branch? Some changes were made in this area in the last few days, so if you haven’t updated for a while it’s worth checking out the newest version.
Here, the AudioPluginDemo resizes correctly when loaded as a VST3 in Live 11 on Windows 10. Resizing using the border of the host window resizes the plugin completely smoothly. Resizing using the plugin’s internal corner resizer is slightly less smooth, with the plugin view being trimmed or bordered briefly. However, the host window always quickly catches up with the editor’s new size.
Yes, the only AUv2 that allow to drag the border are the Apple built in ones.
Funnily Logic keeps showing the resizer cursors over the border regardless if the plugin is resizable or not.
I suspect they have a private/undocumented API to receive the dragging events from the border…