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

Dpi Scaling affect line width.

    XMLWordPrintable

Details

    • Windows

    Description

      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

      Attachments

        1. 100.PNG
          4 kB
          Sami Varanka
        2. 125.PNG
          5 kB
          Sami Varanka
        3. 150_recommended.PNG
          6 kB
          Sami Varanka
        4. 175.PNG
          8 kB
          Sami Varanka
        5. 200.PNG
          10 kB
          Sami Varanka
        6. 225.PNG
          12 kB
          Sami Varanka
        7. 250.PNG
          13 kB
          Sami Varanka
        8. 300.PNG
          18 kB
          Sami Varanka
        9. qt_dpiScalingLineWidth_100.png
          3 kB
          Tero Pelkonen
        10. qt_dpiScalingLineWidth_125.png
          5 kB
          Tero Pelkonen
        11. qt_dpiScalingLineWidth_150.png
          6 kB
          Tero Pelkonen
        12. qt_dpiScalingLineWidth_175.png
          7 kB
          Tero Pelkonen
        13. qt_dpiScalingLineWidth_200.png
          9 kB
          Tero Pelkonen
        14. qt_test_DpiLineWidth.zip
          2 kB
          Tero Pelkonen

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes