From fe56127d9e90c2b364189d38ea43c64ee2019874 Mon Sep 17 00:00:00 2001 From: Méven Car Date: Fri, 10 Jan 2025 10:05:32 +0100 Subject: 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 --- src/panels/information/informationpanelcontent.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/panels/information/informationpanelcontent.cpp') 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 -- cgit v1.3