From a7146a07b2c6251f2a5038ee98d5662bac719c6d Mon Sep 17 00:00:00 2001 From: SET Date: Sat, 14 Nov 2020 11:41:04 +0100 Subject: [PATCH] Add a close button in uid certification popup. --- PopupCertifyUserId.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PopupCertifyUserId.cpp b/PopupCertifyUserId.cpp index f6baea7..d942ca1 100644 --- a/PopupCertifyUserId.cpp +++ b/PopupCertifyUserId.cpp @@ -84,8 +84,12 @@ void PopupCertifyUserId::Create(vector& privateKeys, hblPassphrase->addWidget(unique_ptr (m_lePassphrase), 1); vblMain->addLayout(unique_ptr (hblPassphrase)); + WHBoxLayout * hblButtons = new WHBoxLayout(); + WPushButton * btnClose = new WPushButton(TR("Close")); + hblButtons->addWidget(unique_ptr (btnClose)); m_btnApply = new WPushButton(TR("Apply")); - vblMain->addWidget(unique_ptr (m_btnApply)); + hblButtons->addWidget(unique_ptr (m_btnApply)); + vblMain->addLayout(unique_ptr (hblButtons)); m_cmbPrivKeys->changed().connect(std::bind(&PopupCertifyUserId::ShowPassphrase, this, true)); m_cbOptionExportable->checked().connect(std::bind(&PopupCertifyUserId::OnCertifyOptionChecked, this, 1)); @@ -94,7 +98,7 @@ void PopupCertifyUserId::Create(vector& privateKeys, m_cbOptionExportable->unChecked().connect(std::bind(&PopupCertifyUserId::OnCertifyOptionUnChecked, this, 1)); m_cbOptionNonRevocable->unChecked().connect(std::bind(&PopupCertifyUserId::OnCertifyOptionUnChecked, this, 2)); // m_cbOptionTrust->unChecked().connect(std::bind(&PopupCertifyUserId::OnCertifyOptionUnChecked, this, 4)); - + btnClose->clicked().connect(this, &WPopupWidget::hide); } void PopupCertifyUserId::FillPrivateKeyComboBox(vector& privateKeys)