QIcon: fix call to QIconEngine::scaledPixmap()
QIconEngine::scaledPixmap() takes the size in device independent pixels and therefore it must not be multiplied by dpr here (dpr is given as a separate argument) This amends 245bdc8ec31755d6ab38b796014bdcab6a1d17ae. Pick-to: 6.8 Fixes: QTBUG-126388 Change-Id: Ib6cb5d07dd40f39749eb27bf8ed170480d10d28a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
94a3a492f5
commit
6887986bc5
@ -176,8 +176,7 @@ void QPixmapIconEngine::paint(QPainter *painter, const QRect &rect, QIcon::Mode
|
||||
{
|
||||
auto paintDevice = painter->device();
|
||||
qreal dpr = paintDevice ? paintDevice->devicePixelRatio() : qApp->devicePixelRatio();
|
||||
const QSize pixmapSize = rect.size() * dpr;
|
||||
QPixmap px = scaledPixmap(pixmapSize, mode, state, dpr);
|
||||
QPixmap px = scaledPixmap(rect.size(), mode, state, dpr);
|
||||
painter->drawPixmap(rect, px);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user