diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2022-12-02 17:30:26 +0100 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2022-12-08 00:38:47 +0100 |
commit | 73a3b69f9ae6d49cc04ce9834ab6f3b88d11e35b (patch) | |
tree | 63b26d359fe9e7e2c96c912dff13815fbc416a2b /src/qml/doc/snippets/code | |
parent | ce005eae5899d6db9e7bef58dab4fbb53c858f69 (diff) | |
download | qtdeclarative-73a3b69f9ae6d49cc04ce9834ab6f3b88d11e35b.tar.gz |
Stabilize rendering of Rectangle borders under fractional scaling
By default, border widths are rounded to integer values (in
QSGBasicInternalRectangleNode::updateGeometry()), so one avoids
artifacts where the rendered width can fluctuate with one pixel if the
Rectangle coordinates are fractional. However, that rounding was done
before the device pixel ratio scaling, so if the dpr was fractional,
one would get a fractional rendered border width, and hence
fluctuations.
Fix by taking the dpr into account. The rounding is done in the Item,
where the dpr is known, instead of the SG Node.
Fixes: QTBUG-108831
Pick-to: 6.4 6.2
Change-Id: I9a1d8180c72dd5e1b1eaa9f1c420eb9944f1e5a5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/qml/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions