}
if (m_isCut) {
-#if KICONTHEMES_VERSION >= QT_VERSION_CHECK(6, 5, 0)
KIconEffect::toDisabled(m_pixmap);
-#else
- QImage img = m_pixmap.toImage();
- KIconEffect::toGray(img, 1);
- KIconEffect::semiTransparent(img);
- m_pixmap = QPixmap::fromImage(img);
-#endif
}
if (m_isHidden) {
// Prepare the pixmap that is used when the item gets hovered
if (isHovered()) {
m_hoverPixmap = m_pixmap;
-#if KICONTHEMES_VERSION >= QT_VERSION_CHECK(6, 5, 0)
KIconEffect::toActive(m_hoverPixmap);
-#else
- QImage img = m_pixmap.toImage();
- KIconEffect::toGamma(img, 0.7);
- m_hoverPixmap = QPixmap::fromImage(img);
-#endif
} else if (hoverOpacity() <= 0.0) {
// No hover animation is ongoing. Clear m_hoverPixmap to save memory.
m_hoverPixmap = QPixmap();
/**
* trigger initialisation of proper icon theme
*/
-#if KICONTHEMES_VERSION >= QT_VERSION_CHECK(6, 3, 0)
KIconTheme::initTheme();
-#endif
QApplication app(argc, argv);
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"), app.windowIcon()));
// use it until the preview is done
showIcon(m_item);
} else {
-#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);
}
}