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

Dpi Scaling affect line width.

XMLWordPrintable

    • Windows

      Customer informed us about line width changes with different scaling settings:
      "Depending on DPI scaling settings of the operating system, lines that are intended to be cosmetic (e.g. a thin rectangle frame) may be drawn with different pixel widths for different sides of the same rectangle, which looks really ugly.

      A quick search has not revealed any properties that allow me to specify a border as "cosmetic". Since the border width is int, I also cannot specify a fraction to correct the DPI scaling (and I also don't know how to get the current DPI scaling factors in QML in order to calculate the correction factor).
      The same problem applies to other areas of line drawing, e.g. ShapePath"

      Example pictures and project attached.

      Tested with Qt 6.4.2

        1. qt_dpiScalingLineWidth_100.png
          3 kB
          Tero Pelkonen
        2. qt_dpiScalingLineWidth_125.png
          5 kB
          Tero Pelkonen
        3. qt_dpiScalingLineWidth_175.png
          7 kB
          Tero Pelkonen
        4. qt_dpiScalingLineWidth_200.png
          9 kB
          Tero Pelkonen
        5. qt_dpiScalingLineWidth_150.png
          6 kB
          Tero Pelkonen
        6. qt_test_DpiLineWidth.zip
          2 kB
          Tero Pelkonen
        7. 100.PNG
          4 kB
          Sami Varanka
        8. 125.PNG
          5 kB
          Sami Varanka
        9. 150_recommended.PNG
          6 kB
          Sami Varanka
        10. 175.PNG
          8 kB
          Sami Varanka
        11. 200.PNG
          10 kB
          Sami Varanka
        12. 225.PNG
          12 kB
          Sami Varanka
        13. 250.PNG
          13 kB
          Sami Varanka
        14. 300.PNG
          18 kB
          Sami Varanka
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            oulu_hillbilly Sami Varanka
            tero.pelkonen Tero Pelkonen
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes