Hot Door CORE Forum

Full Version: Hi-DPI or Retina displays
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've just had an opportunity to try my in-progress plugins on a high-res display. AI CC 2017 under Mac OS appears as expected, although text is very sharp. I would guess that's due to a pixel-doubling process they use. Under Windows, however, my panels are the normal size but their contents are shrunk to the upper-left quadrant. My About Box (a modal window rather than a panel) appears normal except that the OK and Cancel buttons at the bottom are cropped off and the escape and return keys are ignored so one can't dismiss it. The dialog needs to be 40px higher for HiDPI, which I can theoretically test by checking the user's screen resolution. Is there a resolution threshold that AI uses to switch to Hi-DPI display so we can detect that mode and make needed adjustments in the code?

Also in Windows at any resolution, labels that have their height set for more than one line often won't honor the "\n" in text, even though Visual Studio displays the string contents with the proper line breaks. When line breaks "break" the text is also centered vertically in the label area, otherwise it properly begins at the top of the rect. I've tried TextFields and TextViews, but they're just not appropriate for many cases.

Has anybody found workarounds for these issues?

I can provide screen captures if this is unclear.
(11-28-2016, 10:18 PM)Rick Johnson Wrote: [ -> ]Under Windows, however, my panels are the normal size but their contents are shrunk to the upper-left quadrant. My About Box (a modal window rather than a panel) appears normal except that the OK and Cancel buttons at the bottom are cropped off and the escape and return keys are ignored so one can't dismiss it. The dialog needs to be 40px higher for HiDPI, which I can theoretically test by checking the user's screen resolution. Is there a resolution threshold that AI uses to switch to Hi-DPI display so we can detect that mode and make needed adjustments in the code?

I ran into this issue using Parallels as well. It has to do with how Parallels controls the resolution in Windows.

Parallels has 3 display modes for retina: Best for Retina, Scaled, and Best for External Displays.

It's not obvious what these mean, but I tested them all and figured this out: Best for Retina means that Parallels controls the resolution, Best for External Displays means Windows controls the resolution, and Scaled means you control the resolution.

So, to get everything to play nice, set the Retina resolution to Scaled. Then, in Windows, set "Settings->System->Display->Change the size of text, apps, and other items" to 100%.
Thank you, Brendon! It worked perfectly.