From 53f0356dc075183fc78e362a097eddc812c4638c Mon Sep 17 00:00:00 2001 From: tobtoht Date: Sun, 23 May 2021 15:29:53 +0200 Subject: [PATCH] TxProofDialog: add copy address button --- src/dialog/TxProofDialog.cpp | 5 +++++ src/dialog/TxProofDialog.ui | 28 ++++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/dialog/TxProofDialog.cpp b/src/dialog/TxProofDialog.cpp index ef7b3e0d..428a6970 100644 --- a/src/dialog/TxProofDialog.cpp +++ b/src/dialog/TxProofDialog.cpp @@ -8,6 +8,7 @@ #include "libwalletqt/Transfer.h" #include "utils/utils.h" +#include "utils/Icons.h" TxProofDialog::TxProofDialog(QWidget *parent, QSharedPointer ctx, TransactionInfo *txInfo) : QDialog(parent) @@ -44,6 +45,10 @@ TxProofDialog::TxProofDialog(QWidget *parent, QSharedPointer ctx, Tr ui->radio_SpendProof->setChecked(true); ui->label_txid->setText(m_txid); + ui->btn_copyAddress->setIcon(icons()->icon("copy.png")); + connect(ui->btn_copyAddress, &QPushButton::clicked, [this]{ + Utils::copyToClipboard(ui->combo_address->currentText()); + }); ui->group_summary->hide(); // todo this->adjustSize(); diff --git a/src/dialog/TxProofDialog.ui b/src/dialog/TxProofDialog.ui index bd599b68..f71486aa 100644 --- a/src/dialog/TxProofDialog.ui +++ b/src/dialog/TxProofDialog.ui @@ -30,7 +30,7 @@ - Prove a payment to an address (OutProof) + Prove payment to an address (OutProof) @@ -226,7 +226,31 @@ - + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + Copy + + + +