From c4ed59b462282759b184771f8058cba307519220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 22 May 2007 15:48:39 +0000 Subject: [PATCH] There is a reasonable rounding function after all. svn path=/trunk/KDE/kdebase/workspace/; revision=667352 --- effects/desktopgrid.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/effects/desktopgrid.cpp b/effects/desktopgrid.cpp index 8e7d9daebe..e29e55fdc1 100644 --- a/effects/desktopgrid.cpp +++ b/effects/desktopgrid.cpp @@ -278,10 +278,10 @@ QRect DesktopGridEffect::desktopRect( int desktop, bool scaled ) const if( !scaled ) return rect; QRect current = desktopRect( effects->currentDesktop(), false ); - rect = QRect( int( round( interpolate( rect.x() - current.x(), rect.x() / float( x ), progress ))), - int( round( interpolate( rect.y() - current.y(), rect.y() / float( y ), progress ))), - int( round( interpolate( rect.width(), displayWidth() / float( x ), progress ))), - int( round( interpolate( rect.height(), displayHeight() / float( y ), progress )))); + rect = QRect( qRound( interpolate( rect.x() - current.x(), rect.x() / float( x ), progress )), + qRound( interpolate( rect.y() - current.y(), rect.y() / float( y ), progress )), + qRound( interpolate( rect.width(), displayWidth() / float( x ), progress )), + qRound( interpolate( rect.height(), displayHeight() / float( y ), progress ))); return rect; }