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

SVG images don't scale on High DPI screens when resource file alias is used without .svg suffix

    XMLWordPrintable

    Details

    • Commits:
      4469fbecd4e004979dada2da72573c06719fee3c (qtsvg/5.7, 30.8.2016, 5.7.1), 710ff392d95fb2888c14ea273f4d65ced908fe49 (qtbase/5.7, 30.8.2016, 5.7.1)

      Description

      When running in high-dpi mode, svg icons are not always scaled properly when they are specified in a stylesheet (using the image property). The problem occurs when a file alias is used that does not contain the suffix, "svg". If the suffix "svg" is not contained in the alias, then the image will be stretched rather than properly scaled when running in high-dpi mode.

      The root issue as I see it is that an alias should not affect how rendering occurs. An advantage of using a file alias for an image resource is that I should be able to change the underlying resource without needing to change the alias.

      Steps to reproduce the issue.
      1. Run attached test application
      2. Observe the rendered svg images with and without .svg suffx

      Expected outcome:
      File alias doesn't affect on how svg is rendered

      Actual outcome:
      File alias without .svg suffix is not scaled properly for High DPI screen.

        Attachments

        1. qtbug55388.zip
          8 kB
        2. qtbug55388.jpg
          qtbug55388.jpg
          39 kB
        3. qtbug55388_diag.diff
          2 kB
        4. groupbox.zip
          7 kB
        5. diag_output.txt
          6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              kleint Friedemann Kleint
              Reporter:
              kileppal Kimmo Leppälä
            • Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes