  class StatusWidget : public QFrame {
    Q_OBJECT
  
  public:
    StatusWidget(QString label, QString msg, QColor c, QWidget* parent = 0);
    void update(QString label, QString msg, QColor c);
  
  protected:
    void paintEvent(QPaintEvent*) override;
  
  private:
 
</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   QLabel status;
  QLabel substatus;
  QVBoxLayout layout;
 </s> add   QVBoxLayout *layout; </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); </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);
  StatusWidget(bool has_substatus, QWidget* parent = 0);
  void update(const QString &label, const QColor &c, const QString &msg = "");
  class StatusWidget : public QFrame {
    Q_OBJECT
  
  public:
  StatusWidget(bool has_substatus, QWidget* parent = 0);
  void update(const QString &label, const QColor &c, const QString &msg = "");
  StatusWidget(bool has_substatus, QWidget* parent = 0);
  void update(const QString &label, const QColor &c, const QString &msg = "");
  
  protected:
    void paintEvent(QPaintEvent*) override;
  
  private:
keep keep keep keep 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.h