From 1627a41a68d1ed9843d4af2a62c90a6821e4361d Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 7 Nov 2022 16:39:53 -0800 Subject: [PATCH] onroad ui: fix opacity affecting other drawn icons (#26378) * save painter in drawIcon * fix * Update selfdrive/ui/qt/onroad.cc old-commit-hash: ed3bf4f12332556c6684141f1a8b2aed6b342ecc --- selfdrive/ui/qt/onroad.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index bfd2f44561..b4925c2f73 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -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);