QAbstractFileIconEngine: store pixmaps with correct key
QAbstractFileIconEngine stores the generated pixmap in a QPixmapCache with the size as key. This is wrong as the size is multiplied by the current devicePixelRatio so this has to be done also for the key. Pick-to: 6.8 Change-Id: I6d8ceedc950d23abf9c4d79d92e86848b9508c9b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 83ff179f85559af880d28d7832d44f95c5ce9616) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
a4dc60e9fc
commit
da4e9b7637
@ -44,7 +44,7 @@ QPixmap QAbstractFileIconEngine::scaledPixmap(const QSize &size, QIcon::Mode mod
|
||||
if (key.isEmpty())
|
||||
return filePixmap(size * scale, mode, state);
|
||||
|
||||
key += u'_' + QString::number(size.width());
|
||||
key += u'_' + QString::number(size.width() * scale);
|
||||
|
||||
QPixmap result;
|
||||
if (!QPixmapCache::find(key, &result)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user