mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 22:57:22 +00:00
Merge pull request #9477 from Morph1984/overlaydialog
overlay_dialog: Hide button dialog box when both buttons are hidden
This commit is contained in:
commit
864c8e4b2f
1 changed files with 11 additions and 1 deletions
|
@ -42,7 +42,7 @@ OverlayDialog::OverlayDialog(QWidget* parent, Core::System& system, const QStrin
|
||||||
MoveAndResizeWindow();
|
MoveAndResizeWindow();
|
||||||
|
|
||||||
// TODO (Morph): Remove this when InputInterpreter no longer relies on the HID backend
|
// TODO (Morph): Remove this when InputInterpreter no longer relies on the HID backend
|
||||||
if (system.IsPoweredOn()) {
|
if (system.IsPoweredOn() && !ui->buttonsDialog->isHidden()) {
|
||||||
input_interpreter = std::make_unique<InputInterpreter>(system);
|
input_interpreter = std::make_unique<InputInterpreter>(system);
|
||||||
|
|
||||||
StartInputThread();
|
StartInputThread();
|
||||||
|
@ -83,6 +83,11 @@ void OverlayDialog::InitializeRegularTextDialog(const QString& title_text, const
|
||||||
ui->button_ok_label->setEnabled(false);
|
ui->button_ok_label->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ui->button_cancel->isHidden() && ui->button_ok_label->isHidden()) {
|
||||||
|
ui->buttonsDialog->hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
connect(
|
connect(
|
||||||
ui->button_cancel, &QPushButton::clicked, this,
|
ui->button_cancel, &QPushButton::clicked, this,
|
||||||
[this](bool) {
|
[this](bool) {
|
||||||
|
@ -130,6 +135,11 @@ void OverlayDialog::InitializeRichTextDialog(const QString& title_text, const QS
|
||||||
ui->button_ok_rich->setEnabled(false);
|
ui->button_ok_rich->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ui->button_cancel_rich->isHidden() && ui->button_ok_rich->isHidden()) {
|
||||||
|
ui->buttonsRichDialog->hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
connect(
|
connect(
|
||||||
ui->button_cancel_rich, &QPushButton::clicked, this,
|
ui->button_cancel_rich, &QPushButton::clicked, this,
|
||||||
[this](bool) {
|
[this](bool) {
|
||||||
|
|
Loading…
Reference in a new issue