Skip to content

Commit 37fde74

Browse files
author
KhalilSelyan
committed
style: set opaque bg to speed limit text
Signed-off-by: KhalilSelyan <khalil@leodrive.ai>
1 parent 08b4dd9 commit 37fde74

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

common/autoware_overlay_rviz_plugin/autoware_vehicle_overlay_rviz_plugin/src/speed_limit_display.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ void SpeedLimitDisplay::drawSpeedLimitIndicator(QPainter & painter, const QRectF
8080
// Draw the outer circle
8181
painter.drawEllipse(outerCircleRect);
8282

83-
// Change the composition mode and draw the inner circle
84-
painter.setCompositionMode(QPainter::CompositionMode_Clear);
85-
painter.drawEllipse(innerCircleRect);
83+
painter.setRenderHint(QPainter::Antialiasing, true);
84+
QColor colorFromHSV;
85+
colorFromHSV.setHsv(0, 0, 0); // Hue, Saturation, Value
8686

87-
// Reset the composition mode
88-
painter.setCompositionMode(QPainter::CompositionMode_SourceOver);
87+
painter.setBrush(colorFromHSV);
88+
painter.drawEllipse(innerCircleRect);
8989

9090
int current_limit_int = std::round(current_limit * 3.6);
9191

0 commit comments

Comments
 (0)