diff options
| author | Méven Car <[email protected]> | 2025-01-10 10:05:32 +0100 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2025-01-11 13:19:57 +0100 |
| commit | fe56127d9e90c2b364189d38ea43c64ee2019874 (patch) | |
| tree | 0a979afeb5f148a3e6f852f849ca1ef9b9927fd1 /src/panels | |
| parent | 9109b6a25177a61d8b314dac4b6715a1e226804f (diff) | |
Icons: when adding overlays pass in the output size
Instead of the pixmap size that won't be accurate.
It allow KGuiAddons::addOverlays to draw larger images to add overlays.
Consequently the emblems are not longer dependant scaled based on the pixmap aspect
ratio.
BUG: 498211
Diffstat (limited to 'src/panels')
| -rw-r--r-- | src/panels/information/informationpanelcontent.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index 428a46a5f..78900ab8a 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -362,9 +362,8 @@ void InformationPanelContent::showPreview(const KFileItem &item, const QPixmap & { m_outdatedPreviewTimer->stop(); - const QSize logicalSize = pixmap.size() / pixmap.devicePixelRatioF(); - QPixmap p = KIconUtils::addOverlays(pixmap, item.overlays()).pixmap(logicalSize, pixmap.devicePixelRatioF()); - p.setDevicePixelRatio(pixmap.devicePixelRatioF()); + QPixmap p = KIconUtils::addOverlays(pixmap, item.overlays()).pixmap(m_preview->size(), devicePixelRatioF()); + p.setDevicePixelRatio(devicePixelRatioF()); if (m_isVideo) { // adds a play arrow overlay |
