    nvgTextBox(s->vg, network_x, network_y, network_w, network_type ? network_type : "--", NULL);
  }
  
  static void draw_metric(UIState *s, const char *label_str, const char *value_str, const int severity, const int y_offset, const char *message_str) {
    const int metric_x = 30;
    const int metric_y = 338 + y_offset;
    const int metric_w = 240;
    const int metric_h = message_str ? strchr(message_str, '\n') ? 124 : 100 : 148;
  
    NVGcolor status_color;
  
    if (severity == 0) {
      status_color = COLOR_WHITE;
    } else if (severity == 1) {
 
</s> remove   ui_draw_rect(s->vg, metric_x, metric_y, metric_w, metric_h,
               severity > 0 ? COLOR_WHITE : COLOR_WHITE_ALPHA(85), 20, 2);
 </s> add   const Rect rect = {30, 338 + y_offset, 240, message_str ? strchr(message_str, '\n') ? 124 : 100 : 148};
  ui_draw_rect(s->vg, rect, severity > 0 ? COLOR_WHITE : COLOR_WHITE_ALPHA(85), 2, 20.); </s> remove     nvgTextBox(s->vg, metric_x + 35, metric_y + (strchr(message_str, '\n') ? 40 : 50), metric_w - 50, message_str, NULL);
 </s> add     nvgTextBox(s->vg, rect.x + 35, rect.y + (strchr(message_str, '\n') ? 40 : 50), rect.w - 50, message_str, NULL); </s> remove   ui_draw_rect(s->vg, rect.x + 6, rect.y + 5,
               ((rect.w - 19) * (s->scene.thermal.getBatteryPercent() * 0.01)), rect.h - 11, COLOR_WHITE);
 </s> add   ui_fill_rect(s->vg, {rect.x + 6, rect.y + 5,
              int((rect.w - 19) * s->scene.thermal.getBatteryPercent() * 0.01), rect.h - 11}, COLOR_WHITE); </s> remove   ui_draw_image(s->vg, rect, s->img_network[img_idx], 1.0f);
 </s> add   ui_draw_image(s->vg, {58, 196, 176, 27}, s->img_network[img_idx], 1.0f); </s> remove   const Rect rect = {58, 196, 176, 27};
 </s> add 
    nvgTextBox(s->vg, network_x, network_y, network_w, network_type ? network_type : "--", NULL);
  }
  
  static void draw_metric(UIState *s, const char *label_str, const char *value_str, const int severity, const int y_offset, const char *message_str) {





    NVGcolor status_color;
  
    if (severity == 0) {
      status_color = COLOR_WHITE;
    } else if (severity == 1) {
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 Use  Rect as the parameter of draw_rect (#19696)

* Use rect as the parameter of draw_rect

* add function ui_fill_rect

* simplify

* rebase master

* apply review 
selfdrive/ui/sidebar.cc