mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 14:52:45 +01:00
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.
This commit is contained in:
parent
fcc93a445f
commit
190ded7f48
1 changed files with 8 additions and 0 deletions
|
@ -83,6 +83,10 @@ void OverlayDialog::InitializeRegularTextDialog(const QString& title_text, const
|
|||
ui->button_ok_label->setEnabled(false);
|
||||
}
|
||||
|
||||
if (ui->button_cancel->isHidden() && ui->button_ok_label->isHidden()) {
|
||||
ui->buttonsDialog->hide();
|
||||
}
|
||||
|
||||
connect(
|
||||
ui->button_cancel, &QPushButton::clicked, this,
|
||||
[this](bool) {
|
||||
|
@ -130,6 +134,10 @@ void OverlayDialog::InitializeRichTextDialog(const QString& title_text, const QS
|
|||
ui->button_ok_rich->setEnabled(false);
|
||||
}
|
||||
|
||||
if (ui->button_cancel_rich->isHidden() && ui->button_ok_rich->isHidden()) {
|
||||
ui->buttonsRichDialog->hide();
|
||||
}
|
||||
|
||||
connect(
|
||||
ui->button_cancel_rich, &QPushButton::clicked, this,
|
||||
[this](bool) {
|
||||
|
|
Loading…
Reference in a new issue