diff options
author | Ales Erjavec <ales.erjavec@fri.uni-lj.si> | 2017-09-12 19:42:36 +0200 |
---|---|---|
committer | Aleš Erjavec <ales.erjavec324@gmail.com> | 2017-10-04 11:25:07 +0000 |
commit | b839a0c2c483b59e3797f35aa1a81f3a3d072f72 (patch) | |
tree | 025e7806d14719200ac0ec11b79e5f2d00afe37e /src | |
parent | bdcd7a97449502f92069d36196cc81064b1c02a0 (diff) | |
download | qtsvg-b839a0c2c483b59e3797f35aa1a81f3a3d072f72.tar.gz |
Return correct PdmDevicePixelRatioScaled metric
QSvgGenerator::metric returned incorrect value for
`PdmDevicePixelRatioScaled` resulting in degenerate
`devicePixelRatioF()` return value.
[ChangeLog][][QSvgGenerator] Report correct devicePixelRatioF
Task-number: QTBUG-63159
Change-Id: Ib45e930b6b1b6d85aea5a68dd2b1b5f16a4eed3b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/svg/qsvggenerator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp index 3f4e545..d294eb2 100644 --- a/src/svg/qsvggenerator.cpp +++ b/src/svg/qsvggenerator.cpp @@ -856,8 +856,9 @@ int QSvgGenerator::metric(QPaintDevice::PaintDeviceMetric metric) const case QPaintDevice::PdmPhysicalDpiY: return d->engine->resolution(); case QPaintDevice::PdmDevicePixelRatio: - case QPaintDevice::PdmDevicePixelRatioScaled: return 1; + case QPaintDevice::PdmDevicePixelRatioScaled: + return 1 * QPaintDevice::devicePixelRatioFScale(); default: qWarning("QSvgGenerator::metric(), unhandled metric %d\n", metric); break; |