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

Image.PreserveAspectFit doubles the image size on iOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.5.0 Beta
    • None
    • Tested on iOS simulator and iPad2
    • iOS/tvOS/watchOS

    Description

      The following code renders the svg image twice as big as it should on iOS (it is well centered bug bigger than the window).

      Removing the Image.PreserveAspectFit property makes the image rendered properly.

      Using a png image instead of svg works fine.

      The same code runs fine on MacOSX, Linux, Android and Windows.

      import QtQuick 2.4
      import QtQuick.Window 2.2
      
      Window {
          visible: true
      
          Image {
              source: "01_cat.svg"
              sourceSize.width: parent.width
              anchors.centerIn: parent
              fillMode: Image.PreserveAspectFit
          }
      }
      

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            bdoin Bruno Coudoin
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes