Browse Source

Qt/Send: Figure a decent warning colour from theme

0.15
Luke Dashjr 8 years ago committed by Jonas Schnelli
parent
commit
3e4d7bfcb7
No known key found for this signature in database
GPG Key ID: 29D4BCB6416F53EC
  1. 8
      src/qt/forms/sendcoinsdialog.ui
  2. 3
      src/qt/sendcoinsdialog.cpp

8
src/qt/forms/sendcoinsdialog.ui

@ -764,9 +764,11 @@
<property name="toolTip"> <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> <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>
<property name="styleSheet"> <property name="font">
<string notr="true">color: rgb(255, 150, 0); <font>
font-weight: bold;</string> <weight>75</weight>
<bold>true</bold>
</font>
</property> </property>
<property name="text"> <property name="text">
<string>Warning: Fee estimation is currently not possible.</string> <string>Warning: Fee estimation is currently not possible.</string>

3
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->labelSmartFee2->show(); // (Smart fee not initialized yet. This usually takes a few blocks...)
ui->labelFeeEstimation->setText(""); ui->labelFeeEstimation->setText("");
ui->fallbackFeeWarningLabel->setVisible(true); 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 else
{ {

Loading…
Cancel
Save