summary refs log tree commit diff
path: root/src/dialogs/MemberList.cpp
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-09-21 13:56:39 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-09-21 13:56:39 +0300
commitb0e3a7c7fac407b12b5bee3cef9dbd6f4ced7a50 (patch)
tree8e223a237db7beac1e77b0a88feea7970a8200d5 /src/dialogs/MemberList.cpp
parentCenter dialogs around the main window (diff)
downloadnheko-b0e3a7c7fac407b12b5bee3cef9dbd6f4ced7a50.tar.xz
Add close buttons to all dialogs
Diffstat (limited to 'src/dialogs/MemberList.cpp')
-rw-r--r--src/dialogs/MemberList.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dialogs/MemberList.cpp b/src/dialogs/MemberList.cpp
index bd9b1edf..df539666 100644
--- a/src/dialogs/MemberList.cpp
+++ b/src/dialogs/MemberList.cpp
@@ -95,8 +95,16 @@ MemberList::MemberList(const QString &room_id, QWidget *parent)
         topLabel_->setAlignment(Qt::AlignCenter);
         topLabel_->setFont(font);
 
+        auto okBtn = new QPushButton("OK", this);
+
+        auto buttonLayout = new QHBoxLayout();
+        buttonLayout->setSpacing(15);
+        buttonLayout->addStretch(1);
+        buttonLayout->addWidget(okBtn);
+
         layout->addWidget(topLabel_);
         layout->addWidget(list_);
+        layout->addLayout(buttonLayout);
 
         list_->clear();
 
@@ -125,6 +133,7 @@ MemberList::MemberList(const QString &room_id, QWidget *parent)
 
         auto closeShortcut = new QShortcut(QKeySequence(tr("ESC")), this);
         connect(closeShortcut, &QShortcut::activated, this, &MemberList::close);
+        connect(okBtn, &QPushButton::clicked, this, &MemberList::close);
 }
 
 void