diff options
author | Andy Shaw <andy.shaw@qt.io> | 2018-02-20 06:36:59 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2018-02-21 10:33:52 +0000 |
commit | 602a6589a1c8d52a3a1d9075528bc16d6e527818 (patch) | |
tree | df57b9847f20dd70e001dba0647dc880d11973f2 /src/quick/util | |
parent | 15416b1ffc6ce83a11bfe5d05e97ecdc45d3411c (diff) |
Image: respect aspect ratio of an SVG when width or height is zero
This amends f42f1366dcd4b070c69c9e7fe42a704ef23da14d
Task-number: QTBUG-65789
Change-Id: I1db05259f0aeb3310bbaf5ea03be52cbd243d115
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/util')
-rw-r--r-- | src/quick/util/qquickimageprovider.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/util/qquickimageprovider.cpp b/src/quick/util/qquickimageprovider.cpp index a1513336a5..4003b88d09 100644 --- a/src/quick/util/qquickimageprovider.cpp +++ b/src/quick/util/qquickimageprovider.cpp @@ -684,7 +684,7 @@ QSize QQuickImageProviderWithOptions::loadSize(const QSize &originalSize, const const bool preserveAspectCropOrFit = options.preserveAspectRatioCrop() || options.preserveAspectRatioFit(); - if (!preserveAspectCropOrFit && (format == "svg" || format == "svgz")) + if (!preserveAspectCropOrFit && (format == "svg" || format == "svgz") && !requestedSize.isEmpty()) return requestedSize; qreal ratio = 0.0; |