aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2017-02-17 08:18:32 +0000
committerJonas Schnelli <dev@jonasschnelli.ch>2017-02-17 11:00:46 +0100
commit3e4d7bfcb7d9f6d88b6120f44bb6cb7fa93d7adf (patch)
treeb3f51f202b5572577aa9f1fa172b67c6fc6e788a /src/qt
parentc5adf8f267b2b4b633af2738c8f21005d4382496 (diff)
downloadbitcoin-3e4d7bfcb7d9f6d88b6120f44bb6cb7fa93d7adf.tar.xz
Qt/Send: Figure a decent warning colour from theme
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/forms/sendcoinsdialog.ui8
-rw-r--r--src/qt/sendcoinsdialog.cpp3
2 files changed, 8 insertions, 3 deletions
diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui
index 2eb3276a8d..ca2da6bf37 100644
--- a/src/qt/forms/sendcoinsdialog.ui
+++ b/src/qt/forms/sendcoinsdialog.ui
@@ -764,9 +764,11 @@
<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="styleSheet">
- <string notr="true">color: rgb(255, 150, 0);
-font-weight: bold;</string>
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
</property>
<property name="text">
<string>Warning: Fee estimation is currently not possible.</string>
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 6180107b0e..d39f92dda3 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -656,6 +656,9 @@ void SendCoinsDialog::updateSmartFeeLabel()
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() + "; }");
}
else
{