┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelix Ernst <[email protected]>2022-05-01 12:10:02 +0200
committerFelix Ernst <[email protected]>2022-05-01 12:10:02 +0200
commit8fda69892284144a8aea3845d2aad844021c99d2 (patch)
tree5fe6bb122e6b8c44061404f33b3708b7906c58f9 /src
parentce720337e5f7db8fa52b5f092b4cb5c4154abac0 (diff)
parent94bbf13ff7fe45cb4a847ed7906fa69d5a39748b (diff)
Merge branch 'release/22.04'
Diffstat (limited to 'src')
-rw-r--r--src/kitemviews/kitemlistview.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp
index 77114735b..562a45e18 100644
--- a/src/kitemviews/kitemlistview.cpp
+++ b/src/kitemviews/kitemlistview.cpp
@@ -1858,6 +1858,8 @@ void KItemListView::doLayout(LayoutAnimationHint hint, int changedIndex, int cha
Q_ASSERT(widget->index() == i);
widget->setVisible(true);
+ bool animateIconResizing = animate;
+
if (widget->size() != itemBounds.size()) {
// Resize the widget for the item to the changed size.
if (animate) {
@@ -1874,11 +1876,13 @@ void KItemListView::doLayout(LayoutAnimationHint hint, int changedIndex, int cha
} else {
widget->resize(itemBounds.size());
}
+ } else {
+ animateIconResizing = false;
}
const int newIconSize = widget->styleOption().iconSize;
if (widget->iconSize() != newIconSize) {
- if (animate) {
+ if (animateIconResizing) {
m_animation->start(widget, KItemListViewAnimation::IconResizeAnimation, newIconSize);
} else {
widget->setIconSize(newIconSize);