      p.drawText(r, Qt::AlignCenter, label);
    } else {
      configFont(p, "Open Sans", 58, 500);
      p.drawText(rect.x() + 50, rect.y() + 71, val);
      configFont(p, "Open Sans", 35, 400);
      p.drawText(rect.x() + 50, rect.y() + 50 + 77, label);
    }
  }
  
  Sidebar::Sidebar(QWidget *parent) : QFrame(parent) {
 
</s> remove     configFont(p, "Open Sans", 58, 500);
 </s> add     configFont(p, "Open Sans", 58, "Bold"); </s> remove     configFont(p, "Open Sans", 35, 500);
 </s> add     configFont(p, "Open Sans", 35, "Bold"); </s> remove   p.drawRect(rect());
 </s> add   p.setCompositionMode(QPainter::CompositionMode_DestinationOver);

  p.setBrush(QBrush(bg));
  p.drawRect(r);

  QLinearGradient g(0, r.y(), 0, r.bottom());
  g.setColorAt(0, QColor::fromRgbF(0, 0, 0, 0.05));
  g.setColorAt(1, QColor::fromRgbF(0, 0, 0, 0.35));
  p.setBrush(QBrush(g));
  p.fillRect(r, g);
  p.setCompositionMode(QPainter::CompositionMode_SourceOver);

  // remove bottom border
  r = QRect(0, height() - h, width(), h - 30);

  // text
  const QPoint c = r.center();
  p.setPen(QColor(0xff, 0xff, 0xff));
  p.setRenderHint(QPainter::TextAntialiasing);
  if (alert_size == cereal::ControlsState::AlertSize::SMALL) {
    configFont(p, "Open Sans", 74, "SemiBold");
    p.drawText(r, Qt::AlignCenter, text1);
  } else if (alert_size == cereal::ControlsState::AlertSize::MID) {
    configFont(p, "Open Sans", 88, "Bold");
    p.drawText(QRect(0, c.y() - 125, width(), 150), Qt::AlignHCenter | Qt::AlignTop, text1);
    configFont(p, "Open Sans", 66, "Regular");
    p.drawText(QRect(0, c.y() + 21, width(), 90), Qt::AlignHCenter, text2);
  } else if (alert_size == cereal::ControlsState::AlertSize::FULL) {
    // TODO: offset from center to match old NVG UI, but why was it this way?
    bool l = text1.length() > 15;
    configFont(p, "Open Sans", l ? 132 : 177, "Bold");
    p.drawText(QRect(0, r.y() + (l ? 240 : 270), width() - 60, 350), Qt::AlignHCenter | Qt::TextWordWrap, text1);
    configFont(p, "Open Sans", 88, "Regular");
    p.drawText(QRect(0, r.height() - (l ? 361 : 420), width() - 60, 300), Qt::AlignHCenter | Qt::TextWordWrap, text2);
  } </s> remove   configFont(p, "Open Sans", 35, 400);
 </s> add   configFont(p, "Open Sans", 35, "Regular"); </s> remove   p.setBrush(QBrush(bg));
 </s> add   static std::map<cereal::ControlsState::AlertSize, const int> alert_sizes = {
    {cereal::ControlsState::AlertSize::NONE, 0},
    {cereal::ControlsState::AlertSize::SMALL, 271},
    {cereal::ControlsState::AlertSize::MID, 420},
    {cereal::ControlsState::AlertSize::FULL, height()},
  };
  int h = alert_sizes[alert_size];
  if (h == 0) {
    return;
  }

  QRect r = QRect(0, height() - h, width(), h);

  // draw background + gradient
    configFont(p, "Open Sans", 35, "Regular");
      p.drawText(r, Qt::AlignCenter, label);
    } else {
      configFont(p, "Open Sans", 58, 500);
      p.drawText(rect.x() + 50, rect.y() + 71, val);
    configFont(p, "Open Sans", 35, "Regular");
      p.drawText(rect.x() + 50, rect.y() + 50 + 77, label);
    }
  }
  
  Sidebar::Sidebar(QWidget *parent) : QFrame(parent) {
keep keep keep keep replace keep keep keep keep keep
 match nvg onroad alerts (#20854) 
selfdrive/ui/qt/sidebar.cc