diff options
| author | Akseli Lahtinen <[email protected]> | 2025-08-25 14:36:32 +0300 |
|---|---|---|
| committer | Felix Ernst <[email protected]> | 2025-08-26 14:42:26 +0200 |
| commit | 2ff301735ed4707a303186e5db4971a51400335b (patch) | |
| tree | 919773730abee22ebbb56d72acd693dd00d16c26 /src/kitemviews | |
| parent | 60cc39930f1b0a78280712c8fe1447e919f018f8 (diff) | |
KItemListView: Check if animation is already started before starting new one
When user changes the zoom rapidly, we start the animation multiple
times, which causes delays with the animation and the icon size
is wrong for a while until user interaction refreshes the view.
This change runs the animation only when it's been finished, and
avoids the issue with the refresh. Instead in those situations,
we know that user is doing something really rapidly, so we
should just set the icon size to what it needs to be.
BUG: 508352
Diffstat (limited to 'src/kitemviews')
| -rw-r--r-- | src/kitemviews/kitemlistview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index 75d85be35..69a800cdf 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -1983,7 +1983,7 @@ void KItemListView::doLayout(LayoutAnimationHint hint, int changedIndex, int cha const int newIconSize = widget->styleOption().iconSize; if (widget->iconSize() != newIconSize) { - if (animateIconResizing) { + if (animateIconResizing && !m_animation->isStarted(widget, KItemListViewAnimation::IconResizeAnimation)) { m_animation->start(widget, KItemListViewAnimation::IconResizeAnimation, newIconSize); } else { widget->setIconSize(newIconSize); |
