]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Revert "Increase smooth scrolling animation duration from 100 to 300 ms and set easin...
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Wed, 31 May 2017 12:05:37 +0000 (14:05 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Wed, 31 May 2017 12:07:16 +0000 (14:07 +0200)
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

index cb1dd61ff4d4109561b29a0c4a073ca7a64bea9c..6bfdba4c9ae5fbd911716e96c136685e7a5ee22e 100644 (file)
@@ -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);