From: tobtoht Date: Sat, 14 Aug 2021 15:02:03 +0000 (+0200) Subject: View-only: add toolip for disabled button X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=c9775affd22b809e0e455b597813df6dead39157;p=gamesguru%2Ffeather.git View-only: add toolip for disabled button --- diff --git a/src/dialog/ViewOnlyDialog.cpp b/src/dialog/ViewOnlyDialog.cpp index 160c0f79..a031a1a2 100644 --- a/src/dialog/ViewOnlyDialog.cpp +++ b/src/dialog/ViewOnlyDialog.cpp @@ -22,7 +22,11 @@ ViewOnlyDialog::ViewOnlyDialog(QSharedPointer ctx, QWidget *parent) connect(ui->btn_Copy, &QPushButton::clicked, this, &ViewOnlyDialog::copyToClipboad); connect(ui->btn_Save, &QPushButton::clicked, this, &ViewOnlyDialog::onWriteViewOnlyWallet); - ui->btn_Save->setEnabled(!m_ctx->wallet->viewOnly()); + if (m_ctx->wallet->viewOnly()) { + ui->btn_Save->setEnabled(false); + ui->btn_Save->setToolTip("Wallet is already view-only"); + } + this->adjustSize(); }