mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 08:16:06 +08:00
onroad ui: fix opacity affecting other drawn icons (#26378)
* save painter in drawIcon * fix * Update selfdrive/ui/qt/onroad.cc
This commit is contained in:
@@ -404,6 +404,7 @@ void AnnotatedCameraWidget::drawText(QPainter &p, int x, int y, const QString &t
|
||||
}
|
||||
|
||||
void AnnotatedCameraWidget::drawIcon(QPainter &p, int x, int y, QPixmap &img, QBrush bg, float opacity) {
|
||||
p.setOpacity(1.0); // bg dictates opacity of ellipse
|
||||
p.setPen(Qt::NoPen);
|
||||
p.setBrush(bg);
|
||||
p.drawEllipse(x - radius / 2, y - radius / 2, radius, radius);
|
||||
|
||||
Reference in New Issue
Block a user