diff options
author | bunnei <bunneidev@gmail.com> | 2019-04-03 17:44:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-03 17:44:18 +0200 |
commit | 774fa0b828ed3b63bd1df1542364693782740878 (patch) | |
tree | 97305444ddba9b25a9001b4310f3cd5b59fcc8bd | |
parent | Merge pull request #2270 from lioncash/plist (diff) | |
parent | yuzu/applets/software_keyboard: Use QDialogButtonBox standard buttons instead of custom buttons (diff) | |
download | yuzu-774fa0b828ed3b63bd1df1542364693782740878.tar yuzu-774fa0b828ed3b63bd1df1542364693782740878.tar.gz yuzu-774fa0b828ed3b63bd1df1542364693782740878.tar.bz2 yuzu-774fa0b828ed3b63bd1df1542364693782740878.tar.lz yuzu-774fa0b828ed3b63bd1df1542364693782740878.tar.xz yuzu-774fa0b828ed3b63bd1df1542364693782740878.tar.zst yuzu-774fa0b828ed3b63bd1df1542364693782740878.zip |
-rw-r--r-- | src/yuzu/applets/profile_select.cpp | 5 | ||||
-rw-r--r-- | src/yuzu/applets/software_keyboard.cpp | 14 |
2 files changed, 8 insertions, 11 deletions
diff --git a/src/yuzu/applets/profile_select.cpp b/src/yuzu/applets/profile_select.cpp index 730426c16..f95f7fe3c 100644 --- a/src/yuzu/applets/profile_select.cpp +++ b/src/yuzu/applets/profile_select.cpp @@ -58,10 +58,7 @@ QtProfileSelectionDialog::QtProfileSelectionDialog(QWidget* parent) scroll_area = new QScrollArea; - buttons = new QDialogButtonBox; - buttons->addButton(tr("Cancel"), QDialogButtonBox::RejectRole); - buttons->addButton(tr("OK"), QDialogButtonBox::AcceptRole); - + buttons = new QDialogButtonBox(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); connect(buttons, &QDialogButtonBox::accepted, this, &QtProfileSelectionDialog::accept); connect(buttons, &QDialogButtonBox::rejected, this, &QtProfileSelectionDialog::reject); diff --git a/src/yuzu/applets/software_keyboard.cpp b/src/yuzu/applets/software_keyboard.cpp index eddc9c941..f3eb29b25 100644 --- a/src/yuzu/applets/software_keyboard.cpp +++ b/src/yuzu/applets/software_keyboard.cpp @@ -75,13 +75,13 @@ QtSoftwareKeyboardDialog::QtSoftwareKeyboardDialog( length_label->setText(QStringLiteral("%1/%2").arg(text.size()).arg(parameters.max_length)); }); - buttons = new QDialogButtonBox; - buttons->addButton(tr("Cancel"), QDialogButtonBox::RejectRole); - buttons->addButton(parameters.submit_text.empty() - ? tr("OK") - : QString::fromStdU16String(parameters.submit_text), - QDialogButtonBox::AcceptRole); - + buttons = new QDialogButtonBox(QDialogButtonBox::Cancel); + if (parameters.submit_text.empty()) { + buttons->addButton(QDialogButtonBox::Ok); + } else { + buttons->addButton(QString::fromStdU16String(parameters.submit_text), + QDialogButtonBox::AcceptRole); + } connect(buttons, &QDialogButtonBox::accepted, this, &QtSoftwareKeyboardDialog::accept); connect(buttons, &QDialogButtonBox::rejected, this, &QtSoftwareKeyboardDialog::reject); layout->addWidget(header_label); |