┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/private/kitemlistsmoothscroller.cpp
diff options
context:
space:
mode:
authorEmmanuel Pescosta <[email protected]>2015-01-29 16:02:39 +0100
committerEmmanuel Pescosta <[email protected]>2015-01-30 09:02:08 +0100
commit08252ffc6983928f83584c1d495d5746f8c0e8a4 (patch)
tree7b74379d7dba601a3a44731c8966a0648817a849 /src/kitemviews/private/kitemlistsmoothscroller.cpp
parentf8187b982afbcd16d15756d8a9840222cfe91d2d (diff)
Port away from KGlobalSettings::graphicEffectsLevel()
REVIEW: 122309
Diffstat (limited to 'src/kitemviews/private/kitemlistsmoothscroller.cpp')
-rw-r--r--src/kitemviews/private/kitemlistsmoothscroller.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/kitemviews/private/kitemlistsmoothscroller.cpp b/src/kitemviews/private/kitemlistsmoothscroller.cpp
index 697d3f526..d5efc2c61 100644
--- a/src/kitemviews/private/kitemlistsmoothscroller.cpp
+++ b/src/kitemviews/private/kitemlistsmoothscroller.cpp
@@ -19,12 +19,11 @@
#include "kitemlistsmoothscroller.h"
-#include <KGlobalSettings>
#include <QEvent>
#include <QPropertyAnimation>
#include <QScrollBar>
#include <QWheelEvent>
-
+#include <QStyle>
#include <QDebug>
KItemListSmoothScroller::KItemListSmoothScroller(QScrollBar* scrollBar,
@@ -36,7 +35,7 @@ KItemListSmoothScroller::KItemListSmoothScroller(QScrollBar* scrollBar,
m_animation(0)
{
m_animation = new QPropertyAnimation(this);
- const int duration = (KGlobalSettings::graphicEffectsLevel() == KGlobalSettings::NoEffects) ? 1 : 100;
+ const int duration = m_scrollBar->style()->styleHint(QStyle::SH_Widget_Animate, nullptr, m_scrollBar) ? 100 : 1;
m_animation->setDuration(duration);
connect(m_animation, &QPropertyAnimation::stateChanged,
this, &KItemListSmoothScroller::slotAnimationStateChanged);