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

QML Image component doesn't apply devicePixelRatio for sourceSize for SVG sources.

    XMLWordPrintable

Details

    • 65784cff0396aaa9379f7693aa1a9169319452f7 (qtdeclarative)

    Description

      By default, Images with SVG sources look bad on Mac and iOS Retina/HiDpi displays
      For example, checkout the poor resolution of this SVG on an iPhone 4s (or newer) or Mac Retina display

      Image.qml
      Image {
          source:  "http://upload.wikimedia.org/wikipedia/commons/0/02/SVG_logo.svg"
          sourceSize.width: 64
          sourceSize.height: 64
      }
      

      One can almost work around this issue by doubling the sourceSize and scaling the resultant image

      Image.qml
      Image {
          source: "http://upload.wikimedia.org/wikipedia/commons/0/02/SVG_logo.svg"
          sourceSize.width: 128
          sourceSize.height: 128
          scale: 0.5
      }
      

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            vkhandus Vadym Khandus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes