Closed tsujan closed 4 years ago
Got rid of qApp
and devicePixelRatio
altogether by scaling the pixmap that the SVG icon engine gives. The final result is the same: sharp SVG icons with non-integer and integer scale factors alike.
This has fixed the old issue of unsharp SVG icons with scale factors here. Any objection to merging?
ship it
Fixes https://github.com/lxqt/libqtxdg/issues/178
The SVG icon engine gives a too big pixmap with scale factors > 1, so that the final drawing will not be sharp if the real size is used. This patch scales down the pixmap to the actual size in order to get a sharp SVG icon, especially with non-integer scale factors.
Now, for the first time in LXQt, I get sharp SVG icons with
QT_SCALE_FACTOR=1.5
:) Before the patch:After the patch:
NOTE: There's a comment in the patch that says, "The cause of this old behavior is unknown to me (@tsujan)." If you know the cause, please replace the comment!