┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/private/kitemlistsmoothscroller.h
diff options
context:
space:
mode:
authorNathan Misner <[email protected]>2024-07-05 15:49:47 +0000
committerFelix Ernst <[email protected]>2024-07-05 15:49:47 +0000
commitb94b172f5163fe5daab50dc197171d3662ee7c0d (patch)
tree961b0e12ee6e5cc52a1cea7c19a1e86dd92b5902 /src/kitemviews/private/kitemlistsmoothscroller.h
parent19e0a829083d72f17830a4af1093d7fb9804ae64 (diff)
Add support for Plasma's global smooth scrolling setting
KItemListSmoothScroller now checks whether smooth scrolling is enabled globally and listens for any changes to the setting via DBus.
Diffstat (limited to 'src/kitemviews/private/kitemlistsmoothscroller.h')
-rw-r--r--src/kitemviews/private/kitemlistsmoothscroller.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/kitemviews/private/kitemlistsmoothscroller.h b/src/kitemviews/private/kitemlistsmoothscroller.h
index d1cfcf9d9..32effa3d6 100644
--- a/src/kitemviews/private/kitemlistsmoothscroller.h
+++ b/src/kitemviews/private/kitemlistsmoothscroller.h
@@ -79,6 +79,13 @@ protected:
private Q_SLOTS:
void slotAnimationStateChanged(QAbstractAnimation::State newState, QAbstractAnimation::State oldState);
+ /**
+ * Calculates the duration of the smooth scrolling animation.
+ * If \p isSmoothScrollingEnabled is true, the duration will be calculated
+ * using the widget animation duration from the current style. Otherwise,
+ * the animation will be instantaneous.
+ */
+ void updateAnimationDuration(bool isSmoothScrollingEnabled);
private:
bool m_scrollBarPressed;