ui: white color define (#23930)

old-commit-hash: 0b47800e74
This commit is contained in:
Lee Jong Mun 2022-03-09 19:24:56 +09:00 committed by GitHub
parent 3dcadf11ec
commit 247dff5621
2 changed files with 3 additions and 2 deletions

View File

@ -314,8 +314,8 @@ void NvgWindow::drawLaneLines(QPainter &painter, const UIScene &scene) {
}
// paint path
QLinearGradient bg(0, height(), 0, height() / 4);
bg.setColorAt(0, scene.end_to_end ? redColor() : QColor(255, 255, 255));
bg.setColorAt(1, scene.end_to_end ? redColor(0) : QColor(255, 255, 255, 0));
bg.setColorAt(0, scene.end_to_end ? redColor() : whiteColor());
bg.setColorAt(1, scene.end_to_end ? redColor(0) : whiteColor(0));
painter.setBrush(bg);
painter.drawPolygon(scene.track_vertices.v, scene.track_vertices.cnt);
}

View File

@ -76,6 +76,7 @@ protected:
void drawLaneLines(QPainter &painter, const UIScene &scene);
void drawLead(QPainter &painter, const cereal::ModelDataV2::LeadDataV3::Reader &lead_data, const QPointF &vd);
inline QColor redColor(int alpha = 255) { return QColor(201, 34, 49, alpha); }
inline QColor whiteColor(int alpha = 255) { return QColor(255, 255, 255, alpha); }
double prev_draw_t = 0;
};