nav: eta match alert colors

This commit is contained in:
Willem Melching
2021-06-09 12:34:52 +02:00
parent ace39431eb
commit ff94882fa6
+8 -10
View File
@@ -625,12 +625,10 @@ MapETA::MapETA(QWidget * parent) : QWidget(parent){
}
{
QVBoxLayout *layout = new QVBoxLayout;
time = new QLabel("22");
time->setStyleSheet(R"(color: green; )");
time = new QLabel;
time->setAlignment(Qt::AlignCenter);
time_unit = new QLabel("min");
time_unit->setStyleSheet(R"(color: green; )");
time_unit = new QLabel;
time_unit->setAlignment(Qt::AlignCenter);
layout->addStretch();
@@ -687,14 +685,14 @@ void MapETA::updateETA(float s, float s_typical, float d) {
}
if (s / s_typical > 1.5) {
time_unit->setStyleSheet(R"(color: red; )");
time->setStyleSheet(R"(color: red; )");
time_unit->setStyleSheet(R"(color: #c92231; )");
time->setStyleSheet(R"(color: #c92231; )");
} else if (s / s_typical > 1.2) {
time_unit->setStyleSheet(R"(color: orange; )");
time->setStyleSheet(R"(color: orange; )");
time_unit->setStyleSheet(R"(color: #da6f25; )");
time->setStyleSheet(R"(color: #da6f25; )");
} else {
time_unit->setStyleSheet(R"(color: green; )");
time->setStyleSheet(R"(color: green; )");
time_unit->setStyleSheet(R"(color: #178644; )");
time->setStyleSheet(R"(color: #178644; )");
}
// Distance