small cleanup (#2715)

albatross
Dean Lee 2020-12-08 21:20:06 +08:00 committed by GitHub
parent 3e466aa528
commit 232cb25683
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

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 &&

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;