drawSiblingsInformation(painter);
}
- auto pixmap = m_pixmap;
+ auto pixmap = isHovered() ? m_hoverPixmap : m_pixmap;
if (!m_overlays.isEmpty()) {
const qreal dpr = KItemViewsUtils::devicePixelRatio(this);
// Finally paint pixmap1 on the widget
drawPixmap(painter, pixmap1);
} else {
- drawPixmap(painter, m_hoverPixmap);
+ drawPixmap(painter, pixmap);
}
} else if (!pixmap.isNull()) {
drawPixmap(painter, pixmap);
m_activateSoonAnimation->setEndValue(1.0);
m_activateSoonAnimation->setDuration(timeUntilActivation);
- const QVariant originalIconName{data()["iconName"]};
+ const QVariant originalIconName{value("iconName")};
connect(m_activateSoonAnimation, &QVariantAnimation::valueChanged, this, [originalIconName, this](const QVariant &value) {
auto progress = value.toFloat();
bool KStandardItemListWidget::isIconControlledByActivateSoonAnimation() const
{
- return m_activateSoonAnimation && data()["iconName"] == "folder-open";
+ return m_activateSoonAnimation && value("iconName") == "folder-open";
}
KItemListWidgetInformant *KStandardItemListWidget::createInformant()
// use a generic icon as fallback
iconName = QStringLiteral("unknown");
}
- const QStringList overlays = values["iconOverlays"].toStringList();
const bool hasFocus = scene()->views()[0]->parentWidget()->hasFocus();
m_pixmap = pixmapForIcon(iconName,
QSize(maxIconWidth, maxIconHeight),