mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-05 16:19:10 +00:00
[KStandardItemListWidget] Avoid needless image resizing
There be rounding errors when scaling pixmaps when keeping aspect ratio Differential Revision: https://phabricator.kde.org/D11319
This commit is contained in:
parent
64f7108d83
commit
ae3438eb08
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue