Changeset View
Changeset View
Standalone View
Standalone View
src/kitemviews/kfileitemmodelrolesupdater.cpp
Show First 20 Lines • Show All 526 Lines • ▼ Show 20 Line(s) | 514 | if (enlargingRequired) { | |||
---|---|---|---|---|---|
527 | scaledPixmap = largeFrame; | 527 | scaledPixmap = largeFrame; | ||
528 | } else { | 528 | } else { | ||
529 | // The image must be shrinked as it is too large to fit into | 529 | // The image must be shrinked as it is too large to fit into | ||
530 | // the available icon size | 530 | // the available icon size | ||
531 | KPixmapModifier::applyFrame(scaledPixmap, m_iconSize); | 531 | KPixmapModifier::applyFrame(scaledPixmap, m_iconSize); | ||
532 | } | 532 | } | ||
533 | } | 533 | } | ||
534 | } else { | 534 | } else { | ||
535 | KPixmapModifier::scale(scaledPixmap, m_iconSize); | 535 | KPixmapModifier::scale(scaledPixmap, m_iconSize * qApp->devicePixelRatio()); | ||
536 | scaledPixmap.setDevicePixelRatio(qApp->devicePixelRatio()); | ||||
536 | } | 537 | } | ||
537 | 538 | | |||
538 | QHash<QByteArray, QVariant> data = rolesData(item); | 539 | QHash<QByteArray, QVariant> data = rolesData(item); | ||
539 | 540 | | |||
540 | const QStringList overlays = data["iconOverlays"].toStringList(); | 541 | const QStringList overlays = data["iconOverlays"].toStringList(); | ||
541 | // Strangely KFileItem::overlays() returns empty string-values, so | 542 | // Strangely KFileItem::overlays() returns empty string-values, so | ||
542 | // we need to check first whether an overlay must be drawn at all. | 543 | // we need to check first whether an overlay must be drawn at all. | ||
543 | // It is more efficient to do it here, as KIconLoader::drawOverlays() | 544 | // It is more efficient to do it here, as KIconLoader::drawOverlays() | ||
▲ Show 20 Lines • Show All 654 Lines • Show Last 20 Lines |