diff options
author | Jocelyn Turcotte <jturcotte@woboq.com> | 2015-05-20 16:29:45 +0200 |
---|---|---|
committer | Jocelyn Turcotte (Woboq GmbH) <jturcotte@woboq.com> | 2015-05-22 14:52:10 +0000 |
commit | 1ebee6e995541554aa9250ccf3326d2579c237c6 (patch) | |
tree | e75c1d8dc5144d0702df44798a9b7979c88f5d1a /src/quick/items/qquickdroparea_p.h | |
parent | b8db3a1c6036e6d8ab68b5f1c01a00c289a67ab8 (diff) |
Fix the implicitSize of SVG Images on retina display
If the user relies on the Image implicitSize to do the layout
but still sets sourceSize to the image, the sourceSize might
be (0, 0) instead of (-1, -1).
readImage checks that the size is > 0 to use the requestedSize
and this would cause us not to use the requestedSize, but still
divide by the devicePixelRatio in QQuickImageBase::pixmapChange,
which would give a different implicitSize on retina display.
Make sure that we get the same implicitSize on both by only
keeping the targetDevicePixelRatio if sourceSize is > (0, 0)
like readImage does.
Task-number: QTBUG-38991
Change-Id: Ib93f57efa47d096f88883845985b44f62db4ad74
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/quick/items/qquickdroparea_p.h')
0 files changed, 0 insertions, 0 deletions