From e1ed9b0f9cfc41dc8ab8e70d47bd5e1d70dac60b Mon Sep 17 00:00:00 2001 From: Rivo Laks Date: Wed, 14 Nov 2007 13:38:07 +0000 Subject: [PATCH] - Reduce saturation even more and brightness a bit less - Also smoothly fade back to normal when logout dialog is closed svn path=/trunk/KDE/kdebase/workspace/; revision=736619 --- effects/logout.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/effects/logout.cpp b/effects/logout.cpp index e712ac7bd4..a3e03a11d4 100644 --- a/effects/logout.cpp +++ b/effects/logout.cpp @@ -26,7 +26,9 @@ LogoutEffect::LogoutEffect() void LogoutEffect::prePaintScreen( ScreenPrePaintData& data, int time ) { if( logout_window != NULL ) - progress = qBound( 0., progress + time / 1000., 1. ); + progress = qBound( 0., progress + time / 4000., 1. ); + else if( progress != 0 ) + progress = qBound( 0., progress - time / 500., 1. ); effects->prePaintScreen( data, time ); } @@ -34,15 +36,15 @@ void LogoutEffect::paintWindow( EffectWindow* w, int mask, QRegion region, Windo { if( w != logout_window && progress != 0 ) { - data.saturation *= ( 1 - progress * 0.6 ); - data.brightness *= ( 1 - progress * 0.6 ); // otherwise saturation doesn't work ??? + data.saturation *= ( 1 - progress * 0.8 ); + data.brightness *= ( 1 - progress * 0.3 ); } effects->paintWindow( w, mask, region, data ); } void LogoutEffect::postPaintScreen() { - if( logout_window != NULL && progress != 1 ) + if( progress != 0 && progress != 1 ) effects->addRepaintFull(); effects->postPaintScreen(); } @@ -62,7 +64,6 @@ void LogoutEffect::windowClosed( EffectWindow* w ) if( w == logout_window ) { logout_window = NULL; - progress = 0; effects->addRepaintFull(); } }