Only upscale small windows in the present windows effect.
BUG: 163105 svn path=/trunk/KDE/kdebase/workspace/; revision=822547
This commit is contained in:
parent
d515abb82c
commit
93592c3d98
1 changed files with 4 additions and 4 deletions
|
@ -714,12 +714,12 @@ void PresentWindowsEffect::calculateWindowTransformationsClosest(EffectWindowLis
|
||||||
geom.setWidth( int( w->width() * scale ));
|
geom.setWidth( int( w->width() * scale ));
|
||||||
}
|
}
|
||||||
// Don't scale the windows too much
|
// 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();
|
QPoint center = geom.center();
|
||||||
geom = QRect( geom.center().x() - w->width(), geom.center().y() - w->height(),
|
geom = QRect( geom.center().x() - int( w->width() * scale ) / 2, geom.center().y() - int( w->height() * scale ) / 2,
|
||||||
2 * w->width(), 2 * w->height() );
|
scale * w->width(), scale * w->height() );
|
||||||
}
|
}
|
||||||
windowData->area = geom;
|
windowData->area = geom;
|
||||||
windowData->scale = scale;
|
windowData->scale = scale;
|
||||||
|
|
Loading…
Reference in a new issue