What is the common approach for UI scaling?

All tested plugins ignore the scale factor on windows completely (at least in FL and Studio One, correct me if Im wrong).
While corner dragging in Serum changes things like slider sizes,
adjusting window sizes in Fabfilter or Izotope plugins doesnt resize a lot of controls, only bg components.

Since I dont have any displays with a resolution other than 1920x1080,
what is the common approach for rescaling for 2k or 4k monitors (in case of Fabfilter or Izotope)?
Overriding AudioProcessorEditor::setScaleFactor to do nothing and use Desktop::setGlobalScaleFactor based on display resolution?

even if you don’t have access to a HD monitor, you can still temporarily set windows to say 150% scaling in order to test your plugins.

On my current project, I’ve made the GUI at the highest res I want, wrapped the whole thing in a container component, then only downscale it from there. Max size on this one was around 800x800.

1 Like

If you are talking about the text and app scaling factor on windows, thats what I tested already. I want to know wheather the common approach is to transform the main component only based on screen res not on scaling factor, since the scaling factor didnt affect any plugin sizes at all. (again, correct me if Im wrong)

Scaling a user interface based on the screen resolution would not be correct on Windows.
This is because on Windows, the user can specify the DPI via the scaling settings. (Note the the idea of changing DPI is a little nonsensical, since ‘dots per inch’ is a hardware specification that can’t actually be changed by software) but that’s how Windows works. You should respect the users preference. The user may need more or less scaling depending on their eyesight, or perhaps they choose to have tiny UIs so they can cram a lot of stuff on-screen.

This can be complicated by the DAW, for example on a 4k monitor Ableton Live forces my plugins to render at a low resolution, which is then scaled-up to a jaggy mess. (Ableton itself takes advantage of the higher resolution, which is a little unfair :wink: ).
How Ableton does this is - a window can be set to be ‘DPI aware’ or not. A ‘not aware’ window runs at a lower resolution logically, and the OS scales the pixels up.

below you can see the different scaling on the plugin vs the DAW

2 Likes