Fixed DockAreaWidget minimumSizeHint

This commit is contained in:
Uwe Kindler 2020-12-23 16:16:13 +01:00
parent 1781fa671d
commit c8fe4c46dd

View File

@ -324,7 +324,6 @@ struct DockAreaWidgetPrivate
}
}
};
// struct DockAreaWidgetPrivate
//============================================================================
@ -974,7 +973,19 @@ bool CDockAreaWidget::isCentralWidgetArea() const
//============================================================================
QSize CDockAreaWidget::minimumSizeHint() const
{
return d->MinSizeHint.isValid() ? d->MinSizeHint : Super::minimumSizeHint();
if (!d->MinSizeHint.isValid())
{
return Super::minimumSizeHint();
}
if (d->TitleBar->isVisible())
{
return d->MinSizeHint + QSize(0, d->TitleBar->minimumSizeHint().height());
}
else
{
return d->MinSizeHint;
}
}