  
  StatusWidget::StatusWidget(QString label, QString msg, QColor c, QWidget* parent) : QFrame(parent) {
    layout.setSpacing(0);
  
    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;)");
  
      substatus.setAlignment(Qt::AlignLeft | Qt::AlignHCenter);
      substatus.setStyleSheet(R"(font-size: 30px; font-weight: 400;)");
  
      layout.addWidget(&status, 0, Qt::AlignLeft);
 
</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     substatus.setAlignment(Qt::AlignLeft | Qt::AlignHCenter);
    substatus.setStyleSheet(R"(font-size: 30px; font-weight: 400;)");
 </s> add   if (has_substatus) {
    layout->setContentsMargins(50, 24, 16, 24);
    status->setAlignment(Qt::AlignLeft | Qt::AlignHCenter);
    status->setStyleSheet(R"(font-size: 65px; font-weight: 500;)"); </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     layout.setContentsMargins(40, 24, 16, 24);
 </s> add     layout->setContentsMargins(40, 24, 16, 24); </s> remove     status.setAlignment(Qt::AlignCenter);
    status.setStyleSheet(R"(font-size: 38px; font-weight: 500;)");
    layout.addWidget(&status, 0, Qt::AlignCenter);
 </s> add     status->setAlignment(Qt::AlignCenter);
    status->setStyleSheet(R"(font-size: 38px; font-weight: 500;)");
    layout->addWidget(status, 0, Qt::AlignCenter);
  status = new QLabel(this);
  
  StatusWidget::StatusWidget(QString label, QString msg, QColor c, QWidget* parent) : QFrame(parent) {
    layout.setSpacing(0);
  
  status = new QLabel(this);
  status = new QLabel(this);
  status = new QLabel(this);
  status = new QLabel(this);
  
      substatus.setAlignment(Qt::AlignLeft | Qt::AlignHCenter);
      substatus.setStyleSheet(R"(font-size: 30px; font-weight: 400;)");
  
      layout.addWidget(&status, 0, Qt::AlignLeft);
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