UI: fix wrong background on controls unresponsive alert

pull/22935/head
Adeeb Shihadeh 3 years ago
parent 833399e941
commit 0e35db7c05
  1. 4
      selfdrive/ui/qt/onroad.cc

@ -43,11 +43,11 @@ void OnroadWindow::updateState(const UIState &s) {
QColor bgColor = bg_colors[s.status];
Alert alert = Alert::get(*(s.sm), s.scene.started_frame);
if (s.sm->updated("controlsState") || !alert.equal({})) {
alerts->updateAlert(alert, bgColor);
}
if (alert.type == "controlsUnresponsive") {
bgColor = bg_colors[STATUS_ALERT];
}
alerts->updateAlert(alert, bgColor);
}
if (bg != bgColor) {
// repaint border
bg = bgColor;

Loading…
Cancel
Save