Make fees on send tab labels

This commit is contained in:
Aditya Kulkarni
2018-10-21 21:06:48 -07:00
parent 0a14fbc911
commit c31111098f
4 changed files with 60 additions and 0 deletions

View File

@@ -55,6 +55,19 @@ void MainWindow::setupSendTab() {
QFont f = ui->Address1->font();
f.setPointSize(f.pointSize() - 1);
ui->MemoTxt1->setFont(f);
// Set up focus enter to set fees
QObject::connect(ui->tabWidget, &QTabWidget::currentChanged, [=] (int pos) {
if (pos == 1) {
// Set the fees
ui->sendTxFees->setText(QString::number(Utils::getTotalFee(), 'g', 8) %
" " % Utils::getTokenName());
ui->sendTxFeesUSD->setText(Settings::getInstance()->getUSDFormat(Utils::getTotalFee()));
// Set focus to the first address box
ui->Address1->setFocus();
}
});
}
void MainWindow::setDefaultPayFrom() {