Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-1777

Support fractional scaling on Windows 10

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.3.2
    • 2.3
    • User Interface
    • Windows 10

      With my resolution 1920x1080 with 150% increase dpi  (suggested) Picard is unusable, too big graphics

          [PICARD-1777] Support fractional scaling on Windows 10

          Pavan Chander added a comment -

          Is my "odd font/icon size" issue related to this fractional scaling issue, or a separate issue? I have a 4k 27" monitor set to 100% scaling and this is what I see. 

          This screenshot is of Picard 2.4.1 on Windows 10. I don't think this issue is new to version 2.4.1, but I don't remember when it first started unfortunately.

          Pavan Chander added a comment - Is my "odd font/icon size" issue related to this fractional scaling issue, or a separate issue? I have a 4k 27" monitor set to 100% scaling and this is what I see.  This screenshot is of Picard 2.4.1 on Windows 10. I don't think this issue is new to version 2.4.1, but I don't remember when it first started unfortunately.

          GitHub Bot added a comment -

          See code changes in pull request #1513 submitted by phw.

          GitHub Bot added a comment - See code changes in pull request #1513 submitted by phw .

          Some test results:

          • On Linux GNOME (Wayland) fractional scaling is experimental and a mess, looks awful and blurry. Also in general using just the default settings the scaling is only respected for the font sizes, not the graphics. You can manually tweak this for Qt by setting appropriate environment variables. But the proposed change makes no difference.
          • On Linux KDE Plasma scaling of Qt applications works as expected, including using fractional scaling. This is true with and without the proposed change here
          • On macOS I can't test as I don't have a retina display. I suppose it is fine as this platform had the best support for scaling.

          I will submit a pull request with the proposed change as a fix for Windows.

          Philipp Wolfer added a comment - Some test results: On Linux GNOME (Wayland) fractional scaling is experimental and a mess, looks awful and blurry. Also in general using just the default settings the scaling is only respected for the font sizes, not the graphics. You can manually tweak this for Qt by setting appropriate environment variables. But the proposed change makes no difference. On Linux KDE Plasma scaling of Qt applications works as expected, including using fractional scaling. This is true with and without the proposed change here On macOS I can't test as I don't have a retina display. I suppose it is fine as this platform had the best support for scaling. I will submit a pull request with the proposed change as a fix for Windows.

          Since at least Qt 5.14 this will work as expected if we set

          QtGui.QGuiApplication.setHighDpiScaleFactorRoundingPolicy(
          QtCore.Qt.HighDpiScaleFactorRoundingPolicy.PassThrough)

          This also seems to resolve related issues with font sizes in HiDPI mode ( PICARD-1240 and PICARD-1753). I'll prepare this change for the next release. But it needs to be tested on macOS and Linux also.

          @Rui: The resizing is limited by the size of the cover art image. I think we have a ticket for this somewhere. Probably would be nice if we could make this image scale down to a certain degree automatically.

          Philipp Wolfer added a comment - Since at least Qt 5.14 this will work as expected if we set QtGui.QGuiApplication.setHighDpiScaleFactorRoundingPolicy( QtCore.Qt.HighDpiScaleFactorRoundingPolicy.PassThrough) This also seems to resolve related issues with font sizes in HiDPI mode ( PICARD-1240 and PICARD-1753 ). I'll prepare this change for the next release. But it needs to be tested on macOS and Linux also. @Rui: The resizing is limited by the size of the cover art image. I think we have a ticket for this somewhere. Probably would be nice if we could make this image scale down to a certain degree automatically.

          Rui added a comment -

          another problem is i can't resize panel below because is blocked... i think when i resize panel should be resized cover too or create a scroll bar

          Rui added a comment - another problem is i can't resize panel below because is blocked... i think when i resize panel should be resized cover too or create a scroll bar

          Related issues also dealing with HiDPI limitations on Windows

          Philipp Wolfer added a comment - Related issues also dealing with HiDPI limitations on Windows

          I think the core issue is the cover art image, and that really behaves interestingly: By default this is shown with 128x128 pixels, but we have the image available in 256x256 pixels for HiDPI use. But Qt5 (at least on Windows) does not scale this to all factors.

          If you set Windows scaling to 125% it will still show the 128x128 pixel size. If you change scaling to 150% it will scale it up to the full 256x256 pixels. I have not fully checked, but I have the suspicion Qt5 does not really support fractional scaling. From a quick look everything else also seems to be scaled by factor 2.

          Philipp Wolfer added a comment - I think the core issue is the cover art image, and that really behaves interestingly: By default this is shown with 128x128 pixels, but we have the image available in 256x256 pixels for HiDPI use. But Qt5 (at least on Windows) does not scale this to all factors. If you set Windows scaling to 125% it will still show the 128x128 pixel size. If you change scaling to 150% it will scale it up to the full 256x256 pixels. I have not fully checked, but I have the suspicion Qt5 does not really support fractional scaling. From a quick look everything else also seems to be scaled by factor 2.

          Rui added a comment -

          run with standard options i can't manage anything, if i search something panel below fill with data become too big to do anything

          Rui added a comment - run with standard options i can't manage anything, if i search something panel below fill with data become too big to do anything

          Zas added a comment -

          Do you run Picard with HiDPI enabled on FullHD resolution?

          Zas added a comment - Do you run Picard with HiDPI enabled on FullHD resolution?

          Please describe "unusable" more precisely. I can see that the cover art is maybe not correctly placed inside the cover art box and the some parts of the window are hidden behind the task bar.

          Wieland Hoffmann added a comment - Please describe "unusable" more precisely. I can see that the cover art is maybe not correctly placed inside the cover art box and the some parts of the window are hidden behind the task bar.

            outsidecontext Philipp Wolfer
            charbonnier Rui
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                Version Package
                2.3.2