Forcing scaling factor

A user interface toolkit mainly for audio plug-ins (VST, AudioUnit, etc).
Post Reply
User avatar
pongasoft
Posts: 88
Joined: Sun Mar 11, 2018 5:57 pm
Location: Las Vegas, USA
Contact:

Forcing scaling factor

Post by pongasoft » Thu May 16, 2019 1:29 pm

Hello

I am developing on a Mac with HiDPI display and so I am working on hi resolution images (which are 2x). So I have 2 versions of every image (2x and 1x) like so (from the uidesc file)

Code: Select all

<bitmap name="button" path="button.png"/>
<bitmap name="button_2x" path="button_2x.png" scale-factor="2"/>
How do I force, either programmatically or in the editor (editorhost) displaying the low resolution images.

Being on a HiDPI display, frame->getScaleFactor returns 2 and I don't see a way to change it. I know I can comment out the lines in the uidesc file to use only low res images, but there are a lot of them and would like to switch back and forth.

Thanks for the help
Yan

Arne Scheffler
Posts: 303
Joined: Mon Jun 20, 2016 7:53 am

Re: Forcing scaling factor

Post by Arne Scheffler » Thu May 16, 2019 4:30 pm

Check the "Open in Low Resolution" option in the Finder Info for the editorhost app.

User avatar
pongasoft
Posts: 88
Joined: Sun Mar 11, 2018 5:57 pm
Location: Las Vegas, USA
Contact:

Re: Forcing scaling factor

Post by pongasoft » Fri May 17, 2019 12:49 pm

Arne Scheffler wrote:
Thu May 16, 2019 4:30 pm
Check the "Open in Low Resolution" option in the Finder Info for the editorhost app.
Thanks this solution indeed works. But is cumbersome and not automateable.

Is there a programatic way to force it? Since everything is automated in my case, everything gets compiled (including editorhost) and started via command line. I would like to be able to detect a flag at runtime and enforce low resolution in code.

Thanks
Yan

Post Reply