This commit is contained in:
Your Name
2024-05-03 22:13:42 -05:00
parent 697ad66b5f
commit 3cb41446ba

View File

@@ -898,16 +898,16 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
// don't paint if not engaged color
if (bg != bg_colors[STATUS_DISENGAGED]) {
// Use current background color
QColor edge_color;
edge_color.setColorAt(0.0, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255)));
edge_color.setColorAt(0.5, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255 * 0.5)));
edge_color.setColorAt(1.0, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255 * 0.1)));
QLinearGradient edge_gradient;
edge_gradient.setColorAt(0.0, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255)));
edge_gradient.setColorAt(0.5, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255 * 0.5)));
edge_gradient.setColorAt(1.0, QColor(bg.red(), bg.green(), bg.blue(), static_cast<int>(OTHER_LANE_ALPHA * 255 * 0.1)));
QPainterPath path;
path.addPolygon(scene.track_vertices);
path.addPolygon(scene.track_edge_vertices);
painter.setBrush(pe);
painter.setBrush(edge_gradient);
painter.drawPath(path);
}