summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-05-25 07:11:01 +0200
committerLioncash <mathew1800@gmail.com>2019-05-25 10:08:02 +0200
commit5d645c6dd9c32fe528d5e10538f1f0681ff8b332 (patch)
tree63ac4b13fa7e442f0cbef55570cf2b761ae5313c
parentsequence_dialog: Remove unnecessary horizontal specifier (diff)
downloadyuzu-5d645c6dd9c32fe528d5e10538f1f0681ff8b332.tar
yuzu-5d645c6dd9c32fe528d5e10538f1f0681ff8b332.tar.gz
yuzu-5d645c6dd9c32fe528d5e10538f1f0681ff8b332.tar.bz2
yuzu-5d645c6dd9c32fe528d5e10538f1f0681ff8b332.tar.lz
yuzu-5d645c6dd9c32fe528d5e10538f1f0681ff8b332.tar.xz
yuzu-5d645c6dd9c32fe528d5e10538f1f0681ff8b332.tar.zst
yuzu-5d645c6dd9c32fe528d5e10538f1f0681ff8b332.zip
-rw-r--r--src/yuzu/util/sequence_dialog/sequence_dialog.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/yuzu/util/sequence_dialog/sequence_dialog.cpp b/src/yuzu/util/sequence_dialog/sequence_dialog.cpp
index 16a5473ca..bb5f74ec4 100644
--- a/src/yuzu/util/sequence_dialog/sequence_dialog.cpp
+++ b/src/yuzu/util/sequence_dialog/sequence_dialog.cpp
@@ -9,15 +9,19 @@
SequenceDialog::SequenceDialog(QWidget* parent) : QDialog(parent) {
setWindowTitle(tr("Enter a hotkey"));
- auto* layout = new QVBoxLayout(this);
+ setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
+
key_sequence = new QKeySequenceEdit;
- layout->addWidget(key_sequence);
- auto* buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+
+ auto* const buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
buttons->setCenterButtons(true);
+
+ auto* const layout = new QVBoxLayout(this);
+ layout->addWidget(key_sequence);
layout->addWidget(buttons);
+
connect(buttons, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(buttons, &QDialogButtonBox::rejected, this, &QDialog::reject);
- setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
}
SequenceDialog::~SequenceDialog() = default;