From: Vishal Rao Date: Sun, 26 Feb 2017 22:44:12 +0000 (+0100) Subject: Increase smooth scrolling animation duration from 100 to 300 ms and set easing curve... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/58c5eae1953bbdcf6d4150b21cb7ffdad07a5257 Increase smooth scrolling animation duration from 100 to 300 ms and set easing curve to InOutQuart Summary: The current animation duration for smooth scrolling is 100 ms which feels as if there is no smooth scroll animation in the first place. Bumping this up to something like 300 ms seems to make the scrolling actually appear smooth. Also, based on diff comments the easing curve is set to InOutQuart. Test Plan: Built this change locally and tried scrolling a folder with many items both single step mouse wheel and also larger steps of the mouse wheel. Reviewers: elvisangelaccio, emmanuelp Reviewed By: emmanuelp Subscribers: htietze, colomar, andreask, emmanuelp, elvisangelaccio Differential Revision: https://phabricator.kde.org/D4560 --- diff --git a/src/kitemviews/private/kitemlistsmoothscroller.cpp b/src/kitemviews/private/kitemlistsmoothscroller.cpp index 6bfdba4c9..cb1dd61ff 100644 --- a/src/kitemviews/private/kitemlistsmoothscroller.cpp +++ b/src/kitemviews/private/kitemlistsmoothscroller.cpp @@ -35,8 +35,9 @@ KItemListSmoothScroller::KItemListSmoothScroller(QScrollBar* scrollBar, m_animation(0) { m_animation = new QPropertyAnimation(this); - const int duration = m_scrollBar->style()->styleHint(QStyle::SH_Widget_Animate, nullptr, m_scrollBar) ? 100 : 1; + const int duration = m_scrollBar->style()->styleHint(QStyle::SH_Widget_Animate, nullptr, m_scrollBar) ? 300 : 1; m_animation->setDuration(duration); + m_animation->setEasingCurve(QEasingCurve::InOutQuart); connect(m_animation, &QPropertyAnimation::stateChanged, this, &KItemListSmoothScroller::slotAnimationStateChanged);