• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Display Scaling Info?

New Here ,
Feb 04, 2017 Feb 04, 2017

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.

TOPICS
SDK

Views

763

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 04, 2017 Feb 04, 2017

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 07, 2017 Feb 07, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 27, 2018 Mar 27, 2018

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines