small cleanup (#2715)

old-commit-hash: 232cb25683ef59a4cc1ce6a7a98eeb57a78a9968
This commit is contained in:
Dean Lee
2020-12-08 21:20:06 +08:00
committed by GitHub
parent 2e07e45bed
commit e89e1a185c
2 changed files with 2 additions and 5 deletions
+2 -4
View File
@@ -532,11 +532,9 @@ static void ui_draw_background(UIState *s) {
void ui_draw(UIState *s) {
s->scene.viz_rect = Rect{bdr_s, bdr_s, s->fb_w - 2 * bdr_s, s->fb_h - 2 * bdr_s};
s->scene.ui_viz_ro = 0;
if (!s->scene.uilayout_sidebarcollapsed) {
s->scene.viz_rect.x = sbr_w + bdr_s;
s->scene.viz_rect.w = s->fb_w - s->scene.viz_rect.x - bdr_s;
s->scene.ui_viz_ro = -(sbr_w - 6 * bdr_s);
s->scene.viz_rect.x += sbr_w;
s->scene.viz_rect.w -= sbr_w;
}
const bool draw_vision = s->started && s->active_app == cereal::UiLayoutState::App::NONE &&
-1
View File
@@ -98,7 +98,6 @@ typedef struct UIScene {
bool uilayout_sidebarcollapsed;
// responsive layout
Rect viz_rect;
int ui_viz_ro;
std::string alert_text1;
std::string alert_text2;