Qt: Use window modality for message boxes

Stops them opening in the middle of the screen on MacOS.
This commit is contained in:
Stenzek
2024-03-31 23:20:59 +10:00
parent f0f1473b6e
commit 86927ea3eb
3 changed files with 5 additions and 0 deletions

View File

@ -141,6 +141,7 @@ void ConsoleSettingsWidget::onEnableCPUClockSpeedControlChecked(int state)
"have confirmed the bug also occurs with overclocking disabled.\n\nThis warning will only be shown once.");
QMessageBox mb(QMessageBox::Warning, tr("CPU Overclocking Warning"), message, QMessageBox::NoButton, this);
mb.setWindowModality(Qt::WindowModal);
const QAbstractButton* const yes_button =
mb.addButton(tr("Yes, I will confirm bugs without overclocking before reporting."), QMessageBox::YesRole);
mb.addButton(tr("No, take me back to safety."), QMessageBox::NoRole);