┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistwidget.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-01-17 09:57:58 +0100
committerPeter Penz <[email protected]>2012-01-17 10:03:22 +0100
commit52b6f68bf842d051a95a34728ce2f9c49c3ddb07 (patch)
tree5fca277419bd5354d44e7d71ee1c62632f202fd5 /src/kitemviews/kitemlistwidget.cpp
parent63cce810a3fd504c6077cbfb7bf10ed35ff1477f (diff)
Disable smooth-scrolling dependent on the graphics-effect level
If the graphics-effect-level has been set to NoEffects (systemsettings -> Appearance -> Style -> Fine Tuning), the smooth scrolling in Dolphin will be disabled. Additionally the duration for the smooth-scrolling has been decreased from 200 ms to 100 ms to reduce the lag. A wrong calculation of the end-value has been fixed that might trigger a wrong position of the content. BUG: 291740 BUG: 291607 FIXED-IN: 4.8.0
Diffstat (limited to 'src/kitemviews/kitemlistwidget.cpp')
-rw-r--r--src/kitemviews/kitemlistwidget.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistwidget.cpp b/src/kitemviews/kitemlistwidget.cpp
index cd2bf4d40..8e6c728f7 100644
--- a/src/kitemviews/kitemlistwidget.cpp
+++ b/src/kitemviews/kitemlistwidget.cpp
@@ -28,6 +28,7 @@
#include <KDebug>
+#include <KGlobalSettings>
#include <QApplication>
#include <QPainter>
#include <QPropertyAnimation>
@@ -243,7 +244,8 @@ void KItemListWidget::setHovered(bool hovered)
if (!m_hoverAnimation) {
m_hoverAnimation = new QPropertyAnimation(this, "hoverOpacity", this);
- m_hoverAnimation->setDuration(200);
+ const int duration = (KGlobalSettings::graphicEffectsLevel() == KGlobalSettings::NoEffects) ? 1 : 200;
+ m_hoverAnimation->setDuration(duration);
connect(m_hoverAnimation, SIGNAL(finished()), this, SLOT(slotHoverAnimationFinished()));
}
m_hoverAnimation->stop();