]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kstandarditemlistwidget.cpp
[KStandardItemListWidget] Avoid needless image resizing
[dolphin.git] / src / kitemviews / kstandarditemlistwidget.cpp
index bc3bb29de94daf12b115fd18b1579d69ccaa60f9..8b7eacf44352da4d78f2983956b1004ef303254b 100644 (file)
@@ -1011,7 +1011,8 @@ void KStandardItemListWidget::updatePixmapCache()
     const int maxScaledIconHeight = scaledIconSize;
 
     m_scaledPixmapSize = m_pixmap.size();
-    m_scaledPixmapSize.scale(maxScaledIconWidth, maxScaledIconHeight, Qt::KeepAspectRatio);
+    m_scaledPixmapSize.scale(maxScaledIconWidth * qApp->devicePixelRatio(), maxScaledIconHeight * qApp->devicePixelRatio(), Qt::KeepAspectRatio);
+    m_scaledPixmapSize = m_scaledPixmapSize / qApp->devicePixelRatio();
 
     if (iconOnTop) {
         // Center horizontally and align on bottom within the icon-area