* Fix fixed size window sizing

* Fix device config windows not appearing centered and modal under Wayland
This commit is contained in:
Cacodemon345
2022-02-09 00:29:19 +06:00
parent dde6bfdce7
commit dd83bdb0f6
13 changed files with 48 additions and 31 deletions

View File

@@ -33,6 +33,12 @@ void StyleOverride::polish(QWidget* widget)
{
QProxyStyle::polish(widget);
/* Disable title bar context help buttons globally as they are unused. */
if (widget->isWindow())
if (widget->isWindow()) {
if (widget->layout() && widget->minimumSize() == widget->maximumSize()) {
widget->setFixedSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX));
widget->layout()->setSizeConstraint(QLayout::SetFixedSize);
widget->setWindowFlag(Qt::MSWindowsFixedSizeDialogHint, true);
}
widget->setWindowFlag(Qt::WindowContextHelpButtonHint, false);
}
}