From 93592c3d98db0155b53dc05a7c2d2bda1937d99b Mon Sep 17 00:00:00 2001 From: Lucas Murray Date: Fri, 20 Jun 2008 16:10:13 +0000 Subject: [PATCH] Only upscale small windows in the present windows effect. BUG: 163105 svn path=/trunk/KDE/kdebase/workspace/; revision=822547 --- effects/presentwindows.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/effects/presentwindows.cpp b/effects/presentwindows.cpp index d02e058df2..6e9134efc5 100644 --- a/effects/presentwindows.cpp +++ b/effects/presentwindows.cpp @@ -714,12 +714,12 @@ void PresentWindowsEffect::calculateWindowTransformationsClosest(EffectWindowLis geom.setWidth( int( w->width() * scale )); } // Don't scale the windows too much - if( scale > 2.0 ) + if( scale > 2.0 || ( scale > 1.0 && ( w->width() > 300 || w->height() > 300 ))) { - scale = 2.0; + scale = ( w->width() > 300 || w->height() > 300 ) ? 1.0 : 2.0; QPoint center = geom.center(); - geom = QRect( geom.center().x() - w->width(), geom.center().y() - w->height(), - 2 * w->width(), 2 * w->height() ); + geom = QRect( geom.center().x() - int( w->width() * scale ) / 2, geom.center().y() - int( w->height() * scale ) / 2, + scale * w->width(), scale * w->height() ); } windowData->area = geom; windowData->scale = scale;