diff options
| author | 2022-12-18 23:54:56 -0500 | |
|---|---|---|
| committer | 2022-12-18 23:54:56 -0500 | |
| commit | 190ded7f485695870aadd391591da93c6cf01af0 (patch) | |
| tree | cb0456da4bb15e21324c78b607943dafa3a0ad6d /src | |
| parent | Merge pull request #9470 from german77/silenceIkillYou (diff) | |
| download | yuzu-190ded7f485695870aadd391591da93c6cf01af0.tar.gz yuzu-190ded7f485695870aadd391591da93c6cf01af0.tar.xz yuzu-190ded7f485695870aadd391591da93c6cf01af0.zip | |
overlay_dialog: Hide button dialog box when both buttons are hidden
This allows for the creation of a non-interactive dialog overlay to display system messages.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/util/overlay_dialog.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/yuzu/util/overlay_dialog.cpp b/src/yuzu/util/overlay_dialog.cpp index b27954512..e6ca8dc3b 100644 --- a/src/yuzu/util/overlay_dialog.cpp +++ b/src/yuzu/util/overlay_dialog.cpp | |||
| @@ -83,6 +83,10 @@ void OverlayDialog::InitializeRegularTextDialog(const QString& title_text, const | |||
| 83 | ui->button_ok_label->setEnabled(false); | 83 | ui->button_ok_label->setEnabled(false); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | if (ui->button_cancel->isHidden() && ui->button_ok_label->isHidden()) { | ||
| 87 | ui->buttonsDialog->hide(); | ||
| 88 | } | ||
| 89 | |||
| 86 | connect( | 90 | connect( |
| 87 | ui->button_cancel, &QPushButton::clicked, this, | 91 | ui->button_cancel, &QPushButton::clicked, this, |
| 88 | [this](bool) { | 92 | [this](bool) { |
| @@ -130,6 +134,10 @@ void OverlayDialog::InitializeRichTextDialog(const QString& title_text, const QS | |||
| 130 | ui->button_ok_rich->setEnabled(false); | 134 | ui->button_ok_rich->setEnabled(false); |
| 131 | } | 135 | } |
| 132 | 136 | ||
| 137 | if (ui->button_cancel_rich->isHidden() && ui->button_ok_rich->isHidden()) { | ||
| 138 | ui->buttonsRichDialog->hide(); | ||
| 139 | } | ||
| 140 | |||
| 133 | connect( | 141 | connect( |
| 134 | ui->button_cancel_rich, &QPushButton::clicked, this, | 142 | ui->button_cancel_rich, &QPushButton::clicked, this, |
| 135 | [this](bool) { | 143 | [this](bool) { |