diff options
| author | David Edmundson <[email protected]> | 2015-03-30 13:39:17 +0200 |
|---|---|---|
| committer | David Edmundson <[email protected]> | 2015-03-30 13:39:17 +0200 |
| commit | 4ed0b82b02aa787ba25bdc5a5e5a99037fdb6efa (patch) | |
| tree | dac01c877cd1b93a721ff7a7e5873fb173eb58b0 /src/kitemviews/kfileitemmodelrolesupdater.cpp | |
| parent | fba5dd58a55e191a3368cc85735826c2b9e18a8b (diff) | |
| parent | 1b6ee5d6cd918b81c59a5163c9d6371f35f9885c (diff) | |
Merge branch 'davidedmundson/highdpi'
REVIEW: 123137
Diffstat (limited to 'src/kitemviews/kfileitemmodelrolesupdater.cpp')
| -rw-r--r-- | src/kitemviews/kfileitemmodelrolesupdater.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp index c18d65892..b03fd9c1a 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.cpp +++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp @@ -501,7 +501,7 @@ void KFileItemModelRolesUpdater::slotGotPreview(const KFileItem& item, const QPi const bool enlargingRequired = scaledPixmap.width() < contentSize.width() && scaledPixmap.height() < contentSize.height(); if (enlargingRequired) { - QSize frameSize = scaledPixmap.size(); + QSize frameSize = scaledPixmap.size() / scaledPixmap.devicePixelRatio(); frameSize.scale(m_iconSize, Qt::KeepAspectRatio); QPixmap largeFrame(frameSize); @@ -510,8 +510,8 @@ void KFileItemModelRolesUpdater::slotGotPreview(const KFileItem& item, const QPi KPixmapModifier::applyFrame(largeFrame, frameSize); QPainter painter(&largeFrame); - painter.drawPixmap((largeFrame.width() - scaledPixmap.width()) / 2, - (largeFrame.height() - scaledPixmap.height()) / 2, + painter.drawPixmap((largeFrame.width() - scaledPixmap.width() / scaledPixmap.devicePixelRatio()) / 2, + (largeFrame.height() - scaledPixmap.height() / scaledPixmap.devicePixelRatio()) / 2, scaledPixmap); scaledPixmap = largeFrame; } else { |
