Merge pull request #2074 from Cacodemon345/patch-47

qt: Fix windows becoming too cramped
This commit is contained in:
Miran Grča
2022-02-09 07:15:53 +01:00
committed by GitHub

View File

@@ -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);