fixes 0003848: Preferences dialog not fully visible

This commit is contained in:
wmayer
2019-02-23 16:28:39 +01:00
parent ce975cef2a
commit d0db1daff7

View File

@@ -298,7 +298,7 @@ void DlgPreferencesImp::applyChanges()
void DlgPreferencesImp::showEvent(QShowEvent* ev)
{
canEmbedScrollArea = false;
//canEmbedScrollArea = false;
QDialog::showEvent(ev);
}
@@ -308,7 +308,7 @@ void DlgPreferencesImp::resizeEvent(QResizeEvent* ev)
// embed the widget stack into a scroll area if the size is
// bigger than the available desktop
QRect rect = QApplication::desktop()->availableGeometry();
int maxHeight = rect.height();
int maxHeight = rect.height() - 60;
int maxWidth = rect.width();
if (height() > maxHeight || width() > maxWidth) {
canEmbedScrollArea = false;
@@ -325,7 +325,7 @@ void DlgPreferencesImp::resizeEvent(QResizeEvent* ev)
if (bar) {
int newWidth = width() + bar->width();
newWidth = std::min<int>(newWidth, maxWidth);
int newHeight = std::min<int>(height(), maxHeight-30);
int newHeight = std::min<int>(height(), maxHeight);
QMetaObject::invokeMethod(this, "resizeWindow",
Qt::QueuedConnection,
QGenericReturnArgument(),