Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-64992

The High-DPI Display Layout Problem

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Not Evaluated
    • None
    • None
    • Other
    • None

    Description

      The Problem

      Consider a desktop setup with a primary high-DPI display (A) and a secondary standard-DPI display (B).

      In device pixel space the size and layout of the displays can look like this:

       

      Display A is configured for 200% (2x) scaling, B runs at 100%. In device independent pixel space the layout looks like this: 

      There is now a gap between the displays, which may come as a surprise to applications.

      Solutions

      0) Do nothing. Having a display position gap is fine.

      • Simple
      • Predictable

      -> This is how Qt currently handles display geometry when AA_EnableHighDpiScaling is enabled.

      1) Move the displays (adjust logical display position)

      We can apply heuristics that detects the inconsistency and make the displays be adjacent:

      This would be implemented by moving all displays towards the origin; eliminating any gaps due to display resizing. Can we implement this robustly enough, or would it be a bug factory? (Think complex display layouts)

      2) Make the end user lay out displays using the logical coordinate system.

      This is in the domain of the operating system and out of scope for Qt, but is mentioned here for completeness. 

      With this solution the user sets up logical pixel layout directly (with the desired adjacencies) and there are no surprises. There is also the additional benefit that displays of similar physical size (in inches and centimeters) will have similar logical pixel sizes.

      However, this creates the opposite problem where display geometry in physical pixel space now overlap. Some operating/windowing systems solve this by making logical pixels the only desktop-wide coordinate system. This works since  physical/backing pixels do not have to have a defined desktop position.

       

      Attachments

        1. Display-1.png
          Display-1.png
          2 kB
        2. Display-2.png
          Display-2.png
          2 kB
        3. Display-3.png
          Display-3.png
          2 kB
        4. Display-4.png
          Display-4.png
          2 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              sorvig Morten Sørvig
              sorvig Morten Sørvig
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes