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

AnimatedSprite incorrectly takes DPI into account when there is no @2x variant available

    XMLWordPrintable

    Details

    • Commits:
      b7a1bcd83a8f68185b617b860cef6f2d2d7c8d9b

      Description

      When running the example in QTBUG-66666 with Qt 5.10, the output is correct: a single square changing in colour over time. With the 5.11 branch (and dev), the output is incorrect: it shows twice the content that it should when run with a retina display (device pixel ratio is 2). It shouldn't indiscriminately use the device pixel ratio when setting the image, as it breaks the use case of displaying pixel art (by setting smooth to false) with AnimatedSprite. Instead, it should only modify the size/scale of the image if an @2x variant was found.

      This is the relevant change: https://codereview.qt-project.org/#/c/227485/

      There doesn't appear to be any workaround for this.

        Attachments

        1. qtbug68490.png
          qtbug68490.png
          6 kB
        2. qtbug68490.zip
          4 kB
        3. sprites.zip
          24 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              allan.jensen Allan Sandfeld Jensen
              Reporter:
              mitch_curtis Mitch Curtis
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes