This commit is contained in:
Your Name
2024-05-04 16:40:14 -05:00
parent e67e80d5c2
commit 2b6ba5dae6
3 changed files with 8 additions and 8 deletions

View File

@@ -641,8 +641,8 @@ void AnnotatedCameraWidget::updateState(const UIState &s) {
}
void AnnotatedCameraWidget::updateLaneEdgeColor(QColor &bgColor) {
if (bg != bgColor) {
bg = bgColor;
if (edgeColor != bgColor) {
edgeColor = bgColor;
}
}
@@ -904,11 +904,11 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
painter.drawPolygon(scene.track_vertices);
// Paint path edges ,Use current background color
if (bg != bg_colors[STATUS_DISENGAGED]) {
if (edgeColor != bg_colors[STATUS_DISENGAGED]) {
QLinearGradient edge_gradient;
edge_gradient.setColorAt(0.0, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(255)));
edge_gradient.setColorAt(0.5, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(255 * 0.7) ));
edge_gradient.setColorAt(1.0, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(255 * 0.5)));
edge_gradient.setColorAt(0.0, QColor(edgeColor.red(), edgeColor.green(), edgeColor.blue(), static_cast<int>(255)));
edge_gradient.setColorAt(0.5, QColor(edgeColor.red(), edgeColor.green(), edgeColor.blue(), static_cast<int>(255 * 0.7) ));
edge_gradient.setColorAt(1.0, QColor(edgeColor.red(), edgeColor.green(), edgeColor.blue(), static_cast<int>(255 * 0.5)));
QPainterPath path;
path.addPolygon(scene.track_vertices);