|
|
|
|
@ -10,6 +10,8 @@ License. See the file "COPYING" for the exact licensing terms. |
|
|
|
|
|
|
|
|
|
#include "desktopgrid.h" |
|
|
|
|
|
|
|
|
|
#include <math.h> |
|
|
|
|
|
|
|
|
|
#include <kaction.h> |
|
|
|
|
#include <kactioncollection.h> |
|
|
|
|
#include <klocale.h> |
|
|
|
|
@ -276,10 +278,10 @@ QRect DesktopGridEffect::desktopRect( int desktop, bool scaled ) const |
|
|
|
|
if( !scaled ) |
|
|
|
|
return rect; |
|
|
|
|
QRect current = desktopRect( effects->currentDesktop(), false ); |
|
|
|
|
rect = QRect( int( interpolate( rect.x() - current.x(), rect.x() / float( x ), progress )), |
|
|
|
|
int( interpolate( rect.y() - current.y(), rect.y() / float( y ), progress )), |
|
|
|
|
int( interpolate( rect.width(), displayWidth() / float( x ), progress )), |
|
|
|
|
int( interpolate( rect.height(), displayHeight() / float( y ), progress ))); |
|
|
|
|
rect = QRect( lround( interpolate( rect.x() - current.x(), rect.x() / float( x ), progress )), |
|
|
|
|
lround( interpolate( rect.y() - current.y(), rect.y() / float( y ), progress )), |
|
|
|
|
lround( interpolate( rect.width(), displayWidth() / float( x ), progress )), |
|
|
|
|
lround( interpolate( rect.height(), displayHeight() / float( y ), progress ))); |
|
|
|
|
return rect; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|