Copy link to clipboard
Copied
In creating a dialog using LrSystemInfo.displayInfo() to get screen size in pixels, I've realized that modern versions of Windows OS featuring display scaling greatly affect the sizing of elements and was wondering if there is any way to retrieve this scaling value to properly size elements to fit the screen.
Copy link to clipboard
Copied
I have a feeling there's no way in the Lightroom SDK but shelling out to some tool and parsing the output is probably the way to go. I'd Google around. My hunch is that you'll run the reg tool to look at some registry value.
db
Copy link to clipboard
Copied
If you find a solution, please post here. I just had a user report that one of my plugin windows doesn't fit on her laptop display (even though it tries to ensure it fits on any size display), and I suspect the problem is that LR is providing misleading information via LrSystemInfo.
Copy link to clipboard
Copied
The root cause of this is a bug in Windows LrSystemInfo.displayInfo(). LrView uses units of scaled pixels, while LrSystemInfo incorreclty returns physical pixels. (On Mac, both LrView and LrSystemInfo use scaled pixels.)
See here for details: Lightroom: LrSystemInfo.displayInfo() returns wrong units of pixels on Windows | Photoshop Family Cu... . Please add your constructive opinion and your me-too vote to that bug report.
It appears you can read the scaling factor for the main display from the registry but not the scaling for secondary displays. For that, you'd have to write a utility that calls the Windows API.