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. 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> (cherry picked from commit da4e9b7637f3ac71397c91109c460ca781abbc7a)
This commit is contained in:
parent
b086e31bbd
commit
02b165f1fa
@ -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