From 883b908b4b26b428e5609d3e7ddd46a9ad884b92 Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Wed, 31 May 2017 14:05:37 +0200 Subject: [PATCH] Revert "Increase smooth scrolling animation duration from 100 to 300 ms and set easing curve to InOutQuart" This reverts commit 58c5eae1953bbdcf6d4150b21cb7ffdad07a5257. Reasons against this change: 1. Scroll is now too fast with devices such as touchpads or trackpoints. 2. Scroll behavior is now inconsistent between Dolphin and other applications (e.g. the Plasma file dialog). Breeze's default animation duration is 100 ms. 3. Many people complained and this feature is currently not configurable. We should introduce a QStyle::SH_Widget_Animation_Duration hint that would allow us to not hardcode durations in Dolphin (i.e. respect whatever duration the users set in their QStyle). Proposal in https://codereview.qt-project.org/#/c/195712/ Reviewers: #vdg, #plasma, emmanuelp, davidedmundson Reviewed By: #plasma, davidedmundson Differential Revision: https://phabricator.kde.org/D5883 --- src/kitemviews/private/kitemlistsmoothscroller.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/kitemviews/private/kitemlistsmoothscroller.cpp b/src/kitemviews/private/kitemlistsmoothscroller.cpp index cb1dd61ff4..6bfdba4c9a 100644 --- a/src/kitemviews/private/kitemlistsmoothscroller.cpp +++ b/src/kitemviews/private/kitemlistsmoothscroller.cpp @@ -35,9 +35,8 @@ 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) ? 300 : 1; + const int duration = m_scrollBar->style()->styleHint(QStyle::SH_Widget_Animate, nullptr, m_scrollBar) ? 100 : 1; m_animation->setDuration(duration); - m_animation->setEasingCurve(QEasingCurve::InOutQuart); connect(m_animation, &QPropertyAnimation::stateChanged, this, &KItemListSmoothScroller::slotAnimationStateChanged);