    p.setClipRect(0,0,25+6,size().height()-6,Qt::ClipOperation::ReplaceClip);
    p.drawRoundedRect(QRectF(6, 6, size().width()-12, size().height()-12), 25, 25);
  }
  
  void StatusWidget::update(QString label, QString msg, QColor c) {
    status.setText(label);
    substatus.setText(msg);
  
    if (color != c) {
      color = c;
      repaint();
    }
    return;
 
</s> remove void SignalWidget::update(QString text, int strength){
  label.setText(text);
  _strength = strength;
 </s> add void SignalWidget::update(const QString &text, int strength) {
  label->setText(text);
  if (_strength != strength) {
    _strength = strength;
    repaint();
  } </s> remove   StatusWidget(QString label, QString msg, QColor c, QWidget* parent = 0);
  void update(QString label, QString msg, QColor c);
 </s> add   StatusWidget(bool has_substatus, QWidget* parent = 0);
  void update(const QString &label, const QColor &c, const QString &msg = ""); </s> remove StatusWidget::StatusWidget(QString label, QString msg, QColor c, QWidget* parent) : QFrame(parent) {
  layout.setSpacing(0);
 </s> add StatusWidget::StatusWidget(bool has_substatus, QWidget *parent) : QFrame(parent) {
  layout = new QVBoxLayout();
  layout->setSpacing(0); </s> remove   if(msg.length() > 0){
    layout.setContentsMargins(50, 24, 16, 24);
    status.setAlignment(Qt::AlignLeft | Qt::AlignHCenter);
    status.setStyleSheet(R"(font-size: 65px; font-weight: 500;)");
 </s> add   status = new QLabel(this);
void StatusWidget::update(const QString &label, const QColor &c, const QString &msg) {
  status->setText(label);
  if (substatus != nullptr) {
    substatus->setText(msg);
  }
    p.setClipRect(0,0,25+6,size().height()-6,Qt::ClipOperation::ReplaceClip);
    p.drawRoundedRect(QRectF(6, 6, size().width()-12, size().height()-12), 25, 25);
  }
  
void StatusWidget::update(const QString &label, const QColor &c, const QString &msg) {
  status->setText(label);
  if (substatus != nullptr) {
    substatus->setText(msg);
  }
void StatusWidget::update(const QString &label, const QColor &c, const QString &msg) {
  status->setText(label);
  if (substatus != nullptr) {
    substatus->setText(msg);
  }
void StatusWidget::update(const QString &label, const QColor &c, const QString &msg) {
  status->setText(label);
  if (substatus != nullptr) {
    substatus->setText(msg);
  }
void StatusWidget::update(const QString &label, const QColor &c, const QString &msg) {
  status->setText(label);
  if (substatus != nullptr) {
    substatus->setText(msg);
  }
    if (color != c) {
      color = c;
      repaint();
    }
    return;
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Sidebar: update text and color in one place (#20777)

* do not set text&color in ctor

* cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> 
selfdrive/ui/qt/sidebar.cc