Documentation browser, improved error messages

This commit is contained in:
tobtoht
2023-10-03 21:00:12 +02:00
parent 15360df99e
commit 951f16e602
88 changed files with 1423 additions and 713 deletions
+13 -7
View File
@@ -9,23 +9,29 @@
BalanceDialog::BalanceDialog(QWidget *parent, Wallet *wallet)
: WindowModalDialog(parent)
, m_wallet(wallet)
, ui(new Ui::BalanceDialog)
{
ui->setupUi(this);
ui->label_unconfirmed_help->setHelpText("Outputs require 10 confirmations before they become spendable. "
"This will take 20 minutes on average.");
connect(m_wallet, &Wallet::balanceUpdated, this, &BalanceDialog::updateBalance);
ui->label_unconfirmed_help->setHelpText("Unconfirmed balance", "Outputs require 10 confirmations before they become spendable. "
"This will take 20 minutes on average.", "balance");
ui->label_unconfirmed->setText(WalletManager::displayAmount(wallet->balance() - wallet->unlockedBalance()));
ui->label_unconfirmed->setFont(Utils::getMonospaceFont());
ui->label_spendable->setText(WalletManager::displayAmount(wallet->unlockedBalance()));
ui->label_spendable->setFont(Utils::getMonospaceFont());
ui->label_total->setText(WalletManager::displayAmount(wallet->balance()));
ui->label_total->setFont(Utils::getMonospaceFont());
this->updateBalance();
this->adjustSize();
}
void BalanceDialog::updateBalance() {
ui->label_unconfirmed->setText(WalletManager::displayAmount(m_wallet->balance() - m_wallet->unlockedBalance()));
ui->label_spendable->setText(WalletManager::displayAmount(m_wallet->unlockedBalance()));
ui->label_total->setText(WalletManager::displayAmount(m_wallet->balance()));
}
BalanceDialog::~BalanceDialog() = default;