Windows display scaling messes up plugin dialogs

A quick update.

In theory window.devicePixelRatio should give me the scaling factor I need. But it sometimes returns 1 when is should be 1.25 or whatever. Reloading the plugin while the OS has a scale factor applied seems to be the most obvious cause.

So then I looked at core.getDisplayConfiguration({}), and specifically the scaleFactor in one of the array elements returned. That seems to be consistently correct, but more testing on more physical monitor setups is required. I don’t know if that might be different for each monitor, and, if so, how to choose which monitor.

On the assumption that that is reliable, I can then scale the dialog height and width appropriately and everything should be OK.

Except that I also need to ensure that the outermost div on every dialog has an absolute width, otherwise any children using % widths (either stand-alone or in calc functions) try to fit themselves to the scaled up dialog width instead of the original design width.

I still have a niggle on height that I haven’t pinned down, but I think I’m getting there.