Prior to this commit, the activateSoonAnimation would not play for
folders using previews. That was because the hoverSequences of
folder previews would always take priority over the
activateSoonAnimation.
This commit prioritises the activateSoonAnimation for the quick
moments in which it is active.
m_activateSoonAnimation->start(QAbstractAnimation::DeleteWhenStopped);
}
m_activateSoonAnimation->start(QAbstractAnimation::DeleteWhenStopped);
}
+bool KStandardItemListWidget::isIconControlledByActivateSoonAnimation() const
+{
+ return m_activateSoonAnimation && data()["iconName"] == "folder-open";
+}
+
KItemListWidgetInformant *KStandardItemListWidget::createInformant()
{
return new KStandardItemListWidgetInformant();
KItemListWidgetInformant *KStandardItemListWidget::createInformant()
{
return new KStandardItemListWidgetInformant();
int sequenceIndex = hoverSequenceIndex();
int sequenceIndex = hoverSequenceIndex();
- if (values.contains("hoverSequencePixmaps")) {
+ if (values.contains("hoverSequencePixmaps") && !isIconControlledByActivateSoonAnimation()) {
// Use one of the hover sequence pixmaps instead of the default
// icon pixmap.
// Use one of the hover sequence pixmaps instead of the default
// icon pixmap.
- if (m_pixmap.isNull()) {
+ if (m_pixmap.isNull() && !isIconControlledByActivateSoonAnimation()) {
m_pixmap = values["iconPixmap"].value<QPixmap>();
}
m_pixmap = values["iconPixmap"].value<QPixmap>();
}
*/
static qreal columnPadding(const KItemListStyleOption &option);
*/
static qreal columnPadding(const KItemListStyleOption &option);
+ /** @returns whether the usual icon should be shown or not. */
+ bool isIconControlledByActivateSoonAnimation() const;
+
protected:
QHash<QByteArray, TextInfo *> m_textInfo; // PlacesItemListWidget needs to access this
protected:
QHash<QByteArray, TextInfo *> m_textInfo; // PlacesItemListWidget needs to access this