Commit 71d0d396 authored by Ian Wadham's avatar Ian Wadham

BUG: 329575 Prevent game selector dialog from spilling into the Taskbar.

parent caba392e
......@@ -37,6 +37,9 @@
#include <QPainter>
#include <QApplication>
#include <QDesktopWidget>
#include <KGlobalSettings>
#include <KConfigGroup>
#include <KIntNumInput>
......@@ -225,6 +228,13 @@ void KGrSLDialog::setupWidgets()
int cell = slParent->width() / (FIELDWIDTH + 4);
dad-> setMinimumSize ((FIELDWIDTH*cell/2), (FIELDHEIGHT-3)*cell);
// Avoid spilling into the Taskbar or Apple Dock area if they get too close.
// Otherwise allow the dialog to choose its size and then be resizeable.
const QRect avail = QApplication::desktop()->availableGeometry(this);
if ((avail.height() - slParent->height()) <= 120) {
dad->setFixedHeight (slParent->height() - 120); // Keep 120 for buttons.
}
// Set the default for the level-number in the scrollbar.
number-> setTracking (true);
number->setValue (defaultLevel);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment