When trying to keep a window fully inside an area, shrink if necessary and possible.
svn path=/trunk/KDE/kdebase/workspace/; revision=814467
This commit is contained in:
parent
71ecd9c64e
commit
22b3584b8d
1 changed files with 5 additions and 0 deletions
|
@ -700,6 +700,11 @@ void Client::keepInArea( QRect area, bool partial )
|
||||||
area.setRight( qMax( area.right() + width() - 100, area.right()));
|
area.setRight( qMax( area.right() + width() - 100, area.right()));
|
||||||
area.setBottom( qMax( area.bottom() + height() - 100, area.bottom()));
|
area.setBottom( qMax( area.bottom() + height() - 100, area.bottom()));
|
||||||
}
|
}
|
||||||
|
if( !partial )
|
||||||
|
{ // resize to fit into area
|
||||||
|
if( area.width() < width() || area.height() < height())
|
||||||
|
resizeWithChecks( qMin( area.width(), width()), qMin( area.height(), height()));
|
||||||
|
}
|
||||||
if ( geometry().right() > area.right() && width() < area.width() )
|
if ( geometry().right() > area.right() && width() < area.width() )
|
||||||
move( area.right() - width(), y() );
|
move( area.right() - width(), y() );
|
||||||
if ( geometry().bottom() > area.bottom() && height() < area.height() )
|
if ( geometry().bottom() > area.bottom() && height() < area.height() )
|
||||||
|
|
Loading…
Reference in a new issue