From d1dcf9a2df5fc9c7afff06ed92b6aa0ed649ba02 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 9 Feb 2022 10:36:22 +0600 Subject: [PATCH] Fix windows becoming too cramped --- src/qt/qt_styleoverride.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qt/qt_styleoverride.cpp b/src/qt/qt_styleoverride.cpp index 628f4c143..acdae7ae0 100644 --- a/src/qt/qt_styleoverride.cpp +++ b/src/qt/qt_styleoverride.cpp @@ -35,8 +35,10 @@ void StyleOverride::polish(QWidget* widget) /* Disable title bar context help buttons globally as they are unused. */ if (widget->isWindow()) { if (widget->layout() && widget->minimumSize() == widget->maximumSize()) { - widget->setFixedSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); - widget->layout()->setSizeConstraint(QLayout::SetFixedSize); + if (widget->minimumSize() < widget->minimumSizeHint()) { + widget->setFixedSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); + widget->layout()->setSizeConstraint(QLayout::SetFixedSize); + } widget->setWindowFlag(Qt::MSWindowsFixedSizeDialogHint, true); } widget->setWindowFlag(Qt::WindowContextHelpButtonHint, false);