    const NVGcolor color = COLOR_BLACK_ALPHA(85);
  #else
    const NVGcolor color = nvgRGBA(0x39, 0x39, 0x39, 0xff);
  #endif
    ui_draw_rect(s->vg, 0, 0, sbr_w, s->fb_h, color);
  }
  
  static void draw_settings_button(UIState *s) {
    const float alpha = s->active_app == cereal::UiLayoutState::App::SETTINGS ? 1.0f : 0.65f;
    ui_draw_image(s->vg, settings_btn, s->img_button_settings, alpha);
 
</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   int alr_s = alert_size_map[scene->alert_size];

  const int alr_x = scene->viz_rect.x - bdr_s;
  const int alr_w = scene->viz_rect.w + (bdr_s * 2);
  const int alr_h = alr_s + bdr_s;
  const int alr_y = s->fb_h - alr_h;
 </s> add   const int alr_h = alert_size_map[scene->alert_size] + bdr_s;
  const Rect rect = {.x = scene->viz_rect.x - bdr_s,
                  .y = s->fb_h - alr_h,
                  .w = scene->viz_rect.w + (bdr_s * 2),
                  .h = alr_h}; </s> remove void ui_draw_rect(NVGcontext *vg, float x, float y, float w, float h, NVGcolor color, float r = 0, int width = 0);
void ui_draw_rect(NVGcontext *vg, float x, float y, float w, float h, NVGpaint &paint, float r = 0);
 </s> add void ui_draw_rect(NVGcontext *vg, const Rect &r, NVGcolor color, int width, float radius = 0);
void ui_fill_rect(NVGcontext *vg, const Rect &r, const NVGpaint &paint, float radius = 0);
void ui_fill_rect(NVGcontext *vg, const Rect &r, const NVGcolor &color, float radius = 0); </s> remove   const Rect rect = {58, 196, 176, 27};
 </s> add  </s> remove   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;

 </s> add 
  ui_fill_rect(s->vg, {0, 0, sbr_w, s->fb_h}, color);
    const NVGcolor color = COLOR_BLACK_ALPHA(85);
  #else
    const NVGcolor color = nvgRGBA(0x39, 0x39, 0x39, 0xff);
  #endif
  ui_fill_rect(s->vg, {0, 0, sbr_w, s->fb_h}, color);
  }
  
  static void draw_settings_button(UIState *s) {
    const float alpha = s->active_app == cereal::UiLayoutState::App::SETTINGS ? 1.0f : 0.65f;
    ui_draw_image(s->vg, settings_btn, s->img_button_settings, alpha);
keep keep keep keep 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