From: Peter Penz Date: Wed, 12 Mar 2008 17:40:46 +0000 (+0000) Subject: respect the graphic effects level before doing a fade-in of the selection toggle X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/bcb9028a5fa4fc5894e8bba6821c019bde1cdf75?ds=sidebyside respect the graphic effects level before doing a fade-in of the selection toggle CCMAIL: ereslibre@kde.org svn path=/trunk/KDE/kdebase/apps/; revision=784872 --- diff --git a/src/selectiontoggle.cpp b/src/selectiontoggle.cpp index fdae03e2b..a2abc49c2 100644 --- a/src/selectiontoggle.cpp +++ b/src/selectiontoggle.cpp @@ -19,6 +19,7 @@ #include "selectiontoggle.h" +#include #include #include #include @@ -177,7 +178,10 @@ void SelectionToggle::startFading() { Q_ASSERT(m_fadingTimeLine == 0); - m_fadingTimeLine = new QTimeLine(1500, this); + const bool animate = KGlobalSettings::graphicEffectsLevel() & KGlobalSettings::SimpleAnimationEffects; + const int duration = animate ? 1500 : 1; + + m_fadingTimeLine = new QTimeLine(duration, this); connect(m_fadingTimeLine, SIGNAL(frameChanged(int)), this, SLOT(setFadingValue(int))); m_fadingTimeLine->setFrameRange(0, 255);