Skip to content

Commit 3e4d7bf

Browse files
luke-jrjonasschnelli
authored andcommitted
Qt/Send: Figure a decent warning colour from theme
1 parent c5adf8f commit 3e4d7bf

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/qt/forms/sendcoinsdialog.ui

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -764,9 +764,11 @@
764764
<property name="toolTip">
765765
<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>
766766
</property>
767-
<property name="styleSheet">
768-
<string notr="true">color: rgb(255, 150, 0);
769-
font-weight: bold;</string>
767+
<property name="font">
768+
<font>
769+
<weight>75</weight>
770+
<bold>true</bold>
771+
</font>
770772
</property>
771773
<property name="text">
772774
<string>Warning: Fee estimation is currently not possible.</string>

src/qt/sendcoinsdialog.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,9 @@ void SendCoinsDialog::updateSmartFeeLabel()
656656
ui->labelSmartFee2->show(); // (Smart fee not initialized yet. This usually takes a few blocks...)
657657
ui->labelFeeEstimation->setText("");
658658
ui->fallbackFeeWarningLabel->setVisible(true);
659+
int lightness = ui->fallbackFeeWarningLabel->palette().color(QPalette::WindowText).lightness();
660+
QColor warning_colour(255 - (lightness / 5), 176 - (lightness / 3), 48 - (lightness / 14));
661+
ui->fallbackFeeWarningLabel->setStyleSheet("QLabel { color: " + warning_colour.name() + "; }");
659662
}
660663
else
661664
{

0 commit comments

Comments
 (0)