I am currently making our plug-ins resizable, using setGlobalScaleFactor.
Does anybody know of a callback that will be called as a result of setting the global scale?
The reason that I am asking is that I have noticed in Ableton Live if I have several instances of the same plug-in on different tracks all with their editor’s open, changing the global scale for one plug-in will scale all the other GUI’s as expected but not change the host window size.
This does not happen in hosts that keep all track’s plug-in editor windows open, but Ableton keeps the editors open and ‘hides’ them in a way that doesn’t seem to trigger any obvious callbacks.
So I am looking for a way to be notified when the global scale changes in order to correct problems like this. Unless this is a known, or recently fixed bug?
We have only recently moved to using the Juce 6 master branch so may have missed any recent fixes.
I would advise NOT to use “setGlobalScaleFactor”. It has several drawbacks that are unacceptable to users.
Wrap your entire UI into one dummy “Component” and use “setTransform” on it to scale it (and thus its children). You can calculate the scale factor for that pretty easily.
Now each window can have it’s own scale factor without affecting any other windows.
I was torn between using the method you outline and using setGlobalScale but thought the global scale was the ‘official’ way to do it so was trying to make it work.
I have been moved onto a different project for a few weeks but will use the transform method when I go back to it, thanks again for the straight forward advice.
Just out of interest (as it would probably be helpful to many other developers) is anyone successfully using a global scale or is everyone setting a transform per plugin?
The detailed class documentation for Juce is great but it seems like there are quite a few high level things like this that should be (and probably are) simple but the documentation is lacking or out of date.