diff options
| author | Luke Dashjr <[email protected]> | 2017-06-05 22:57:35 +0000 |
|---|---|---|
| committer | Luke Dashjr <[email protected]> | 2017-06-05 22:57:35 +0000 |
| commit | aca4b6dbcb1c2b7f0c3808fd8ad3eb7dce158555 (patch) | |
| tree | f9ee7790c9de23ea3ea9c6ef88356db0a5ef1bef /src/qt | |
| parent | Merge #10234, #10143 (fixes only), and #9853 via branch 'disconnect_ban_fixes... (diff) | |
| parent | Qt/Send: Give fallback fee a reasonable indent (diff) | |
| download | discoin-aca4b6dbcb1c2b7f0c3808fd8ad3eb7dce158555.tar.xz discoin-aca4b6dbcb1c2b7f0c3808fd8ad3eb7dce158555.zip | |
Merge #9481 via remote-tracking branch 'jonas/2017/01/fee_warning' into 0.14.2_fixes
Diffstat (limited to 'src/qt')
| -rw-r--r-- | src/qt/forms/sendcoinsdialog.ui | 22 | ||||
| -rw-r--r-- | src/qt/sendcoinsdialog.cpp | 7 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui index ca8ecffaf..ca2da6bf3 100644 --- a/src/qt/forms/sendcoinsdialog.ui +++ b/src/qt/forms/sendcoinsdialog.ui @@ -760,10 +760,32 @@ </layout> </item> <item> + <widget class="QLabel" name="fallbackFeeWarningLabel"> + <property name="toolTip"> + <string>Using the fallbackfee can result in sending a transaction that will take serval hours or days (or never) to confirm. Consider choosing your fee manually or wait until your have validated the complete chain.</string> + </property> + <property name="font"> + <font> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>Warning: Fee estimation is currently not possible.</string> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> <spacer name="horizontalSpacer_4"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> + <property name="sizeType"> + <enum>QSizePolicy::MinimumExpanding</enum> + </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 1c0ed663c..65ca00755 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -23,6 +23,7 @@ #include "txmempool.h" #include "wallet/wallet.h" +#include <QFontMetrics> #include <QMessageBox> #include <QScrollBar> #include <QSettings> @@ -656,6 +657,11 @@ void SendCoinsDialog::updateSmartFeeLabel() std::max(CWallet::fallbackFee.GetFeePerK(), CWallet::GetRequiredFee(1000))) + "/kB"); ui->labelSmartFee2->show(); // (Smart fee not initialized yet. This usually takes a few blocks...) ui->labelFeeEstimation->setText(""); + ui->fallbackFeeWarningLabel->setVisible(true); + int lightness = ui->fallbackFeeWarningLabel->palette().color(QPalette::WindowText).lightness(); + QColor warning_colour(255 - (lightness / 5), 176 - (lightness / 3), 48 - (lightness / 14)); + ui->fallbackFeeWarningLabel->setStyleSheet("QLabel { color: " + warning_colour.name() + "; }"); + ui->fallbackFeeWarningLabel->setIndent(QFontMetrics(ui->fallbackFeeWarningLabel->font()).width("x")); } else { @@ -663,6 +669,7 @@ void SendCoinsDialog::updateSmartFeeLabel() std::max(feeRate.GetFeePerK(), CWallet::GetRequiredFee(1000))) + "/kB"); ui->labelSmartFee2->hide(); ui->labelFeeEstimation->setText(tr("Estimated to begin confirmation within %n block(s).", "", estimateFoundAtBlocks)); + ui->fallbackFeeWarningLabel->setVisible(false); } updateFeeMinimizedLabel(); |