diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-07-18 16:52:08 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-07-19 09:53:00 +0000 |
commit | 5138fada0b9ce3968b23ec11df5f0d4e67544c43 (patch) | |
tree | ee7aae8533d80852420565837f5c9a9ab0135732 /qmake/generators/win32/msvc_vcproj.cpp | |
parent | a9dfdbd06acc6a11a03f298a794e290da1028992 (diff) |
Fix QHighDpi::fromNativeLocalExposedRegion rounding errors
Calling bottom/right/bottomRight on a QRect is discouraged, as it does
not give the true bottom-right corner of the rectangle, instead giving
a point one unit to the left and top of the true bottom right.
Dividing this point by a scale factor of e.g. 2, and then using qCeil
on the bottom right x and y coordinates would result in a pointRegion
that was 1x1 * scaleFactor larger than it should, manifesting as
rendering issues at later stages.
We can get away from the whole problem by initially converting the
QRect to a QRectF, and basing the pointRegion's rect on the scaled
size instead of bottom-right coordinates.
Change-Id: I4d4895660655cfa8749c93c7d2573ae79cd7898b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'qmake/generators/win32/msvc_vcproj.cpp')
0 files changed, 0 insertions, 0 deletions