-rw-r--r-- | core/launcher/serverinterface.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/core/launcher/serverinterface.cpp b/core/launcher/serverinterface.cpp index 7002243..9eb7f75 100644 --- a/core/launcher/serverinterface.cpp +++ b/core/launcher/serverinterface.cpp @@ -95,43 +95,45 @@ bool LayoutManager::eventFilter( QObject *object, QEvent *event ) return QObject::eventFilter( object, event ); } void LayoutManager::layout() { QRect mwr( qApp->desktop()->geometry() ); QListIterator<Item> it( docked ); Item *item; for ( ; (item = it.current()); ++it ) { QWidget *w = item->w; if ( !w->isVisible() ) continue; + + QSize sh = w->sizeHint(); switch ( item->p ) { case ServerInterface::Top: - w->resize( mwr.width(), w->sizeHint().height() ); - w->move( mwr.topLeft() ); + w->setGeometry( mwr.left(), mwr.top(), + mwr.width(), sh.height() ); mwr.setTop( w->geometry().bottom() + 1 ); break; case ServerInterface::Bottom: - w->resize( mwr.width(), w->sizeHint().height() ); - w->move( mwr.left(), mwr.bottom()-w->height()+1 ); + w->setGeometry( mwr.left(), mwr.bottom() - sh.height(), + mwr.width(), sh.height() ); mwr.setBottom( w->geometry().top() - 1 ); break; case ServerInterface::Left: - w->resize( w->sizeHint().width(), mwr.height() ); - w->move( mwr.topLeft() ); + w->setGeometry( mwr.left(), mwr.top(), + sh.width(), mwr.height() ); mwr.setLeft( w->geometry().right() + 1 ); break; case ServerInterface::Right: - w->resize( w->sizeHint().width(), mwr.height() ); - w->move( mwr.right()-w->width()+1, mwr.top() ); + w->setGeometry( mwr.right() - sh.width(), mwr.top(), + sh.width(), mwr.height() ); mwr.setRight( w->geometry().left() - 1 ); break; } } #ifdef Q_WS_QWS # if QT_VERSION < 0x030000 QWSServer::setMaxWindowRect( qt_screen->mapToDevice(mwr, QSize(qt_screen->width(),qt_screen->height())) ); # else QWSServer::setMaxWindowRect( mwr ); # endif |