My plugin has an issue with scaling on Windows (currently testing on Windows 10, 64b) - if the scaling factor of the OS is set to something larger than 1, the GUI will be rendered smaller than its window. Essentially it will be rendered in the same physical size as when scaling is 1, but within a larger window, thus leaving empty space on the bottom and the right side of the GUI. Weirdly clicking in the empty space does click on the correct place within the GUI if it were scaled to fill its window… This is observable in FL Studio and Studio One, and it is NOT observable in the Plugin Host JUCE example.
Since my graphics are not vector, the size of the Plugin Editor is fixed (for example 600x600).
Looking at the current display’s info, the scale property constantly remains 1.
I read about some solution with AffineTransform, but I haven’t found any examples on how to do that.
However, I would recommend changing your UI to use FlexBox and have it calculate the layout of the components for you. I used to use the transform and it becomes a bit of a nightmare to manage on anything but a simple UI.
Shure, I will likely not use as much raster graphics in the next project either. This design was too rich to be recreated vectorially and I had to either implement Photoshop in my plugin or just use the raster graphics.
How do I know what the scaling factor should be?
I get scalingFactor of 1, constantly.
So I am basically saying:
size my window 600x600;
draw this 600x600 image at 0,0 with size 600x600
And the result is the image being drawn on 600x600 physical pixels within a window that is in 600x600 virtual/logical pixels (larger frame).
How do I know what value should I use for the scaling factor when it draws my image without scaling, but sizes my window with scaling? Do I get the window size somehow? I don’t understand what the reference value should be…
Hi, just reread your message and saw that you’re setting the OS scaling, not something within Juce. Sounds like something the Juce team will need to deal with.
I’m not sure if ‘like’ is the correct word when describing scaling bugs but yes, I’ve pushed a fix to develop that should be up shortly. Thanks for the report and example