From c8fe4c46dd0ffc736514c597b7a6fe4147333489 Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Wed, 23 Dec 2020 16:16:13 +0100 Subject: [PATCH] Fixed DockAreaWidget minimumSizeHint --- src/DockAreaWidget.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/DockAreaWidget.cpp b/src/DockAreaWidget.cpp index 10046a5..882ae6d 100644 --- a/src/DockAreaWidget.cpp +++ b/src/DockAreaWidget.cpp @@ -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; + } }