I’ve started making design prototypes for my UIs to try to make them better. However, at most I get a nice looking interface that I then implement with hard-coded pixel values, which means I can’t resize my window.
How do you make resizable UIs when you’re working off of a fixed design?
Also, how do you make a resizable JUCE window in general?
Although my plugin window is resizable, most components have a fixed height/width ratio. Only something like spectrum/waveform is fully resizable. I just calculate the size of each component w.r.t. the size of the full window and resize them.
I would guess it is very difficult & time consuming to make the UI fully reactive, like Apple website.
That’s a fair point. Now that I’m checking a lot of the plugins I use the most aren’t resizable at all. The ones that are fully resizable are TAL-Sampler and the Valhalla ones.
Have you looked at the FlexBox and Grid classes? They’re designed for making flexible UIs. Personally I find them a bit non-intuitive, but there’s a good tutorial for them, and an example in the demo runner.
A very simple method is to put all your components in a new container Component and stick that in the editor, and then set an affine transform on that container component based on the size of the window (you can’t do this directly on the editor). This will automatically scale everything by the right amount. You don’t need to do anything else. Of course if you’re using a lot of images they might become blurry when the window is scaled too much.