  
    panda = new StatusWidget("NO\nPANDA", "", QColor(201, 34, 49), this);
    layout->addWidget(panda, 0, Qt::AlignTop);
  
    connect = new StatusWidget("CONNECT\nOFFLINE", "",  QColor(218, 202, 37), this);
    layout->addWidget(connect, 0, Qt::AlignTop);
  
    QImage image = QImageReader("../assets/images/button_home.png").read();
    QLabel *comma = new QLabel(this);
    comma->setPixmap(QPixmap::fromImage(image));
 
</s> remove   label.setText(text);
  layout.addWidget(&label, 0, Qt::AlignLeft);
  label.setStyleSheet(R"(font-size: 35px; font-weight: 400;)");
 </s> add   label = new QLabel(this);
  label->setStyleSheet(R"(font-size: 35px; font-weight: 400;)");
  layout->addWidget(label, 0, Qt::AlignLeft); </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   panda->update(panda_message, "", panda_color);
 </s> add   panda->update(panda_message, panda_color); </s> remove     layout.addWidget(&status, 0, Qt::AlignLeft);
    layout.addWidget(&substatus, 0, Qt::AlignLeft);
 </s> add     substatus = new QLabel(this);
    substatus->setAlignment(Qt::AlignLeft | Qt::AlignHCenter);
    substatus->setStyleSheet(R"(font-size: 30px; font-weight: 400;)");

    layout->addWidget(status, 0, Qt::AlignLeft);
    layout->addWidget(substatus, 0, Qt::AlignLeft); </s> remove   connect->update(net_params.first, "", net_params.second);
 </s> add   connect->update(net_params.first, net_params.second);
  connect = new StatusWidget(false, this);
  
    panda = new StatusWidget("NO\nPANDA", "", QColor(201, 34, 49), this);
    layout->addWidget(panda, 0, Qt::AlignTop);
  
  connect = new StatusWidget(false, this);
    layout->addWidget(connect, 0, Qt::AlignTop);
  
    QImage image = QImageReader("../assets/images/button_home.png").read();
    QLabel *comma = new QLabel(this);
    comma->setPixmap(QPixmap::fromImage(image));
keep keep keep keep 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