GUI size doesn’t coincide with the size of background.png


I’ve just compiled the helloworld_with_VSTGUI example and tested it with Reaper on Windows 10.
The GUI size in Reaper (437 x 150 px) doesn’t coincide with the size of bachground.png (350 x 120 px ). It looks like VSTGUI scales the actual size of background. The scale factor is 1.25.
How can I fix this problem?

I’ve just found out that the problem happens when I set “Scale and layout” to 125% in Windows’ “Display settings”. This is a serious problem in my case because I want to make a large GUI for my plug-in, and the plug-in window has not enough place on my monitor (1600 x 900 px) when I set “Scale and layout” to 125%. The same problem can
happen on computers of other users.
Besides that GUI becomes blurred because of resizing. Reapers’ own plug-ins don’t resize when I set “Scale and layout” to 125%. Is it possible to do the same with VSTGUI?
Any idea will be highly appreciated.

So you want the UI to not scale to the Windows setting? Normally windows should scale depending on the setting in the “Display Setting” control panel. If you don’t want it to look blurry you can add pre-rendered scaled bitmaps to the UI.

There’s also a possibility to add custom scaling when creating the VST3Editor instance you can call its method VST3Editor::setAllowedZoomFactors(..) and then you can make a right click in your plug-in editor and choose one of the zoom factors.

Yes, I want the UI to not scale to the Windows setting because my GUI is very large and it becomes larger than the monitor’s screen after resizing.
I’ve tried the following code:
but it doesn’t solve the problem, my GUI remains larger than the monitor’s screen. Besides that I’d prefer to use the right mouse button for another purpose.
The problem looks simple because it is already solved in a lot of VST
plug-ins, but I don’t see how to solve it with VSTGUI.

You can hack it if you want. Just patch the VST3Editor::setContentScaleFactor () function to do nothing.

It works! Thank you very much, Arne!