From 6a671fa2f27552cb5336b78da42a9ab21707fcf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 19 Feb 2009 09:31:58 +0000 Subject: [PATCH] Change the timeline curve shape depending on the number of rotations. If there is only one rotation it is an EaseInOut curve, if there are more than one rotations first is an EaseIn, last an EaseOut all other Linear curves. svn path=/trunk/KDE/kdebase/workspace/; revision=928255 --- effects/cube/cubeslide.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/effects/cube/cubeslide.cpp b/effects/cube/cubeslide.cpp index b952fc53fb..edb55eba7c 100644 --- a/effects/cube/cubeslide.cpp +++ b/effects/cube/cubeslide.cpp @@ -413,6 +413,10 @@ void CubeSlideEffect::postPaintScreen() break; } timeLine.setProgress( 0.0 ); + if( slideRotations.count() == 1 ) + timeLine.setCurveShape( TimeLine::EaseOutCurve ); + else + timeLine.setCurveShape( TimeLine::LinearCurve ); if( slideRotations.empty() ) { effects->setActiveFullScreenEffect( 0 ); @@ -494,6 +498,10 @@ void CubeSlideEffect::desktopChanged( int old ) } if( activate ) { + if( slideRotations.count() == 1 ) + timeLine.setCurveShape( TimeLine::EaseInOutCurve ); + else + timeLine.setCurveShape( TimeLine::EaseInCurve ); effects->setActiveFullScreenEffect( this ); timeLine.setProgress( 0.0 ); front_desktop = old;