make possible to set a maximum size actually less than the deskop

svn path=/trunk/KDE/kdelibs/; revision=1129183
This commit is contained in:
Marco Martin 2010-05-21 14:43:28 +00:00
parent f08bf871f6
commit 208d362a25

View File

@ -337,7 +337,7 @@ void Dialog::syncToGraphicsWidget()
QDesktopWidget *desktop = QApplication::desktop();
QSize maxSize = desktop->availableGeometry(desktop->screenNumber(this)).size();
graphicsWidget->setMaximumSize(maxSize - QSize(left + right, top + bottom));
graphicsWidget->setMaximumSize(maxSize - QSize(left + right, top + bottom).boundedTo(graphicsWidget->effectiveSizeHint(Qt::MaximumSize).toSize()));
setMinimumSize(-1, -1);
setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);