┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/information
diff options
context:
space:
mode:
authorNicolas Fella <[email protected]>2024-07-17 00:03:52 +0200
committerNicolas Fella <[email protected]>2024-07-18 23:15:45 +0000
commit38ab14c87a945153e683657483fa4bcf44d6b0fb (patch)
tree876e7606ce0086bb4c782b7fe4b9b0e3598747d6 /src/panels/information
parent43269bc9283a3f52fa08f5dbefee728b673f58ce (diff)
Port away from deprecated KIconEffect API
Diffstat (limited to 'src/panels/information')
-rw-r--r--src/panels/information/informationpanelcontent.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp
index 86a569a86..70d85a402 100644
--- a/src/panels/information/informationpanelcontent.cpp
+++ b/src/panels/information/informationpanelcontent.cpp
@@ -411,8 +411,15 @@ void InformationPanelContent::markOutdatedPreview()
// use it until the preview is done
showIcon(m_item);
} else {
- KIconEffect *iconEffect = KIconLoader::global()->iconEffect();
- QPixmap disabledPixmap = iconEffect->apply(m_preview->pixmap(), KIconLoader::Desktop, KIconLoader::DisabledState);
+#if KICONTHEMES_VERSION >= QT_VERSION_CHECK(6, 5, 0)
+ QPixmap disabledPixmap = m_preview->pixmap();
+ KIconEffect::toDisabled(disabledPixmap);
+#else
+ QImage img = m_preview->pixmap().toImage();
+ KIconEffect::toGray(img, 1);
+ KIconEffect::semiTransparent(img);
+ QPixmap disabledPixmap = QPixmap::fromImage(img);
+#endif
m_preview->setPixmap(disabledPixmap);
}
}