      p.drawEllipse(QRectF(_dotspace * i, _top, _dia, _dia));
    }
  }
  
  void SignalWidget::update(QString text, int strength){
    label.setText(text);
    _strength = strength;
  }
  
  Sidebar::Sidebar(QWidget* parent) : QFrame(parent) {
    QVBoxLayout* layout = new QVBoxLayout();
    layout->setContentsMargins(25, 50, 25, 50);
 
</s> remove Sidebar::Sidebar(QWidget* parent) : QFrame(parent) {
  QVBoxLayout* layout = new QVBoxLayout();
 </s> add Sidebar::Sidebar(QWidget *parent) : QFrame(parent) {
  QVBoxLayout *layout = new QVBoxLayout(); </s> remove   for (int i = 0; i < 5 ; i++){
    if(i == _strength){
 </s> add   for (int i = 0; i < 5; i++) {
    if (i == _strength) { </s> remove SignalWidget::SignalWidget(QString text, int strength, QWidget* parent) : QFrame(parent), _strength(strength) {
  layout.setMargin(0);
  layout.setSpacing(0);
  layout.insertSpacing(0, 45);
 </s> add SignalWidget::SignalWidget(QWidget *parent) : QFrame(parent), _strength(0) {
  layout = new QVBoxLayout();
  layout->setMargin(0);
  layout->setSpacing(0);
  layout->insertSpacing(0, 45); </s> remove   SignalWidget(QString text, int strength, QWidget* parent = 0);
  void update(QString text, int strength);
  QLabel label;
 </s> add   SignalWidget(QWidget* parent = 0);
  void update(const QString &text, int strength);
  QLabel *label; </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);
void SignalWidget::update(const QString &text, int strength) {
  label->setText(text);
  if (_strength != strength) {
    _strength = strength;
    repaint();
  }
      p.drawEllipse(QRectF(_dotspace * i, _top, _dia, _dia));
    }
  }
  
void SignalWidget::update(const QString &text, int strength) {
  label->setText(text);
  if (_strength != strength) {
    _strength = strength;
    repaint();
  }
void SignalWidget::update(const QString &text, int strength) {
  label->setText(text);
  if (_strength != strength) {
    _strength = strength;
    repaint();
  }
void SignalWidget::update(const QString &text, int strength) {
  label->setText(text);
  if (_strength != strength) {
    _strength = strength;
    repaint();
  }
  }
  
  Sidebar::Sidebar(QWidget* parent) : QFrame(parent) {
    QVBoxLayout* layout = new QVBoxLayout();
    layout->setContentsMargins(25, 50, 25, 50);
keep keep keep keep 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