summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Spoerl <axel.spoerl@qt.io>2024-04-26 08:27:10 +0000
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2024-04-27 00:22:27 +0000
commitc03274c5c4a6453969a37b5b5ee44f89f4e9de11 (patch)
tree9db34838d807b151d9b2d97a43c4b70418452df1
parentf268b9828935ff9834e2ea5b12b194db59396800 (diff)
Revert "QCommonStyle: paint arrows with anti-aliasing"6.7
This reverts commit 74e8f673b827c57ebf2bf802840c19e4a1ac848b. Reason for revert: the change as is makes the rendering of arrows in the styles unpleasantly blurry. Change-Id: I59ccd7373631a550276465caffb7d3074ff5893c Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 35309856201dea2f14e53468a3c39a777c062729) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--src/widgets/styles/qcommonstyle.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 958da27825..e5d5abfa09 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -763,10 +763,9 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
if (!QPixmapCache::find(pixmapName, &pixmap)) {
const qreal border = pixelRatio * (size / 5.);
const qreal sqsize = pixelRatio * size;
- QImage image(sqsize, sqsize, QImage::Format_ARGB32_Premultiplied);
- image.fill(Qt::transparent);
- QPainter imagePainter(&image);
- imagePainter.setRenderHint(QPainter::Antialiasing);
+ pixmap = QPixmap(QSize(size, size));
+ pixmap.fill(Qt::transparent);
+ QPainter imagePainter(&pixmap);
QPolygonF poly;
switch (pe) {
@@ -813,7 +812,6 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q
imagePainter.drawPolygon(poly);
imagePainter.end();
- pixmap = QPixmap::fromImage(image);
pixmap.setDevicePixelRatio(pixelRatio);
QPixmapCache::insert(pixmapName, pixmap);
}