diff --git a/src/kcmultidialog.cpp b/src/kcmultidialog.cpp --- a/src/kcmultidialog.cpp +++ b/src/kcmultidialog.cpp @@ -27,8 +27,10 @@ #include "kcmoduleproxy.h" +#include #include #include +#include #include #include #include @@ -261,9 +263,18 @@ void KCMultiDialog::showEvent(QShowEvent *ev) { - resize(QSize(800, 550)); - adjustSize(); KPageDialog::showEvent(ev); + adjustSize(); + /** + * adjustSize() relies on sizeHint but is limited to 2/3 of the desktop size + * Workaround for https://bugreports.qt.io/browse/QTBUG-3459 + * + * We adjust the size after passing the show event + * because otherwise window pos is set to (0,0) + */ + const QSize maxSize = QApplication::desktop()->availableGeometry(pos()).size(); + resize(qMin(sizeHint().width(), maxSize.width()), + qMin(sizeHint().height(), maxSize.height())); } void KCMultiDialog::slotDefaultClicked()