┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/private
diff options
context:
space:
mode:
Diffstat (limited to 'src/kitemviews/private')
-rw-r--r--src/kitemviews/private/kitemlistviewanimation.cpp8
-rw-r--r--src/kitemviews/private/kitemlistviewanimation.h6
2 files changed, 11 insertions, 3 deletions
diff --git a/src/kitemviews/private/kitemlistviewanimation.cpp b/src/kitemviews/private/kitemlistviewanimation.cpp
index 9dc5fbada..0c16c8b0a 100644
--- a/src/kitemviews/private/kitemlistviewanimation.cpp
+++ b/src/kitemviews/private/kitemlistviewanimation.cpp
@@ -146,7 +146,15 @@ void KItemListViewAnimation::start(QGraphicsWidget* widget, AnimationType type,
break;
}
+ case IconResizeAnimation: {
+ propertyAnim = new QPropertyAnimation(widget, QByteArrayLiteral("iconSize"));
+ propertyAnim->setDuration(animationDuration);
+ propertyAnim->setEndValue(endValue);
+ break;
+ }
+
default:
+ Q_UNREACHABLE();
break;
}
diff --git a/src/kitemviews/private/kitemlistviewanimation.h b/src/kitemviews/private/kitemlistviewanimation.h
index 8d11dbf89..5e0ebf982 100644
--- a/src/kitemviews/private/kitemlistviewanimation.h
+++ b/src/kitemviews/private/kitemlistviewanimation.h
@@ -32,7 +32,9 @@ public:
MovingAnimation,
CreateAnimation,
DeleteAnimation,
- ResizeAnimation
+ ResizeAnimation,
+ IconResizeAnimation,
+ AnimationTypeCount
};
explicit KItemListViewAnimation(QObject* parent = nullptr);
@@ -79,8 +81,6 @@ private Q_SLOTS:
void slotFinished();
private:
- enum { AnimationTypeCount = 4 };
-
Qt::Orientation m_scrollOrientation;
qreal m_scrollOffset;
QHash<QGraphicsWidget*, QPropertyAnimation*> m_animation[AnimationTypeCount];