diff options
author | Saturneric <[email protected]> | 2021-05-27 19:51:18 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-05-27 19:51:18 +0000 |
commit | ad4c0c1e140de2ffdd2f803a643bdfe4c0fb07bc (patch) | |
tree | f01ad3ec20f85a17d433502e169eab99f2719b92 /src/ui/keypair_details/KeyPairDetailTab.cpp | |
parent | Fix the wrong use of the signing key interface. (diff) | |
download | GpgFrontend-ad4c0c1e140de2ffdd2f803a643bdfe4c0fb07bc.tar.gz GpgFrontend-ad4c0c1e140de2ffdd2f803a643bdfe4c0fb07bc.zip |
Adjust part of the text of the UI interface of the UID operation tab.
Write an interface to increase UID.
Write logic to adapt and increase UID.
Adjust the UI of KeygenDialog.
Delete the Close button of KeyDetailTab and its logic.
Adjust the KeyDetailTab fingerprint and its copy button UI.
Fix the problem of refreshing the order of the KeyPairUIDTab list.
Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | src/ui/keypair_details/KeyPairDetailTab.cpp | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/src/ui/keypair_details/KeyPairDetailTab.cpp b/src/ui/keypair_details/KeyPairDetailTab.cpp index 366abf27..873b478c 100644 --- a/src/ui/keypair_details/KeyPairDetailTab.cpp +++ b/src/ui/keypair_details/KeyPairDetailTab.cpp @@ -13,8 +13,6 @@ KeyPairDetailTab::KeyPairDetailTab(GpgME::GpgContext *ctx, const GpgKey &key, QW keyBox = new QGroupBox(tr("Key details")); fingerprintBox = new QGroupBox(tr("Fingerprint")); additionalUidBox = new QGroupBox(tr("Additional Uids")); - buttonBox = new QDialogButtonBox(QDialogButtonBox::Close); - connect(buttonBox, SIGNAL(rejected()), this, SLOT(close())); nameVarLabel = new QLabel(key.name); nameVarLabel->setTextInteractionFlags(Qt::TextSelectableByMouse); @@ -90,38 +88,21 @@ KeyPairDetailTab::KeyPairDetailTab(GpgME::GpgContext *ctx, const GpgKey &key, QW fingerPrintVarLabel = new QLabel(beautifyFingerprint(key.fpr)); fingerPrintVarLabel->setTextInteractionFlags(Qt::TextSelectableByMouse); - fingerPrintVarLabel->setStyleSheet("margin-left: 20; margin-right: 20;"); + fingerPrintVarLabel->setStyleSheet("margin-left: 5; margin-right: 5;"); auto *hboxFP = new QHBoxLayout(); hboxFP->addWidget(fingerPrintVarLabel); - QIcon ico(":button_copy.png"); - QPushButton copyFingerprintButton(QIcon(ico.pixmap(12, 12)), ""); - //copyFingerprintButton.setStyleSheet("QPushButton {border: 0px; } QPushButton:Pressed {} "); - copyFingerprintButton.setFlat(true); - copyFingerprintButton.setToolTip(tr("copy fingerprint to clipboard")); - connect(©FingerprintButton, SIGNAL(clicked()), this, SLOT(slotCopyFingerprint())); + auto *copyFingerprintButton = new QPushButton(tr("Copy")); + copyFingerprintButton->setFlat(true); + copyFingerprintButton->setToolTip(tr("copy fingerprint to clipboard")); + connect(copyFingerprintButton, SIGNAL(clicked()), this, SLOT(slotCopyFingerprint())); - hboxFP->addWidget(©FingerprintButton); + hboxFP->addWidget(copyFingerprintButton); fingerprintBox->setLayout(hboxFP); mvbox->addWidget(fingerprintBox); - // If key has more than primary uid, also show the other uids -// gpgme_user_id_t addUserIds = key->uids->next; -// if (addUserIds != nullptr) { -// auto *vboxUID = new QVBoxLayout(); -// while (addUserIds != nullptr) { -// addUserIdsVarLabel = new QLabel( -// QString::fromUtf8(addUserIds->name) + QString(" <") + addUserIds->email + ">"); -// addUserIdsVarLabel->setTextInteractionFlags(Qt::TextSelectableByMouse); -// vboxUID->addWidget(addUserIdsVarLabel); -// addUserIds = addUserIds->next; -// } -// additionalUidBox->setLayout(vboxUID); -// mvbox->addWidget(additionalUidBox); -// } - if (key.is_private_key) { auto *privKeyBox = new QGroupBox(tr("Private Key")); auto *vboxPK = new QVBoxLayout(); @@ -157,8 +138,6 @@ KeyPairDetailTab::KeyPairDetailTab(GpgME::GpgContext *ctx, const GpgKey &key, QW mvbox->addLayout(expBox); } - mvbox->addWidget(buttonBox); - setAttribute(Qt::WA_DeleteOnClose, true); setLayout(mvbox); } |