]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
View-only: add toolip for disabled button
authortobtoht <thotbot@protonmail.com>
Sat, 14 Aug 2021 15:02:03 +0000 (17:02 +0200)
committertobtoht <thotbot@protonmail.com>
Wed, 15 Sep 2021 21:45:24 +0000 (23:45 +0200)
src/dialog/ViewOnlyDialog.cpp

index 160c0f79688b6f45644cdc489999ecfdc5fcb3e4..a031a1a2611b2b400658818fd4510a1d2fab0efa 100644 (file)
@@ -22,7 +22,11 @@ ViewOnlyDialog::ViewOnlyDialog(QSharedPointer<AppContext> 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();
 }