From f9160f89dabff7629c10822adbd7e3db662c0265 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 13 Feb 2024 19:37:55 -0600 Subject: [PATCH] wip --- selfdrive/ui/qt/home.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/selfdrive/ui/qt/home.cc b/selfdrive/ui/qt/home.cc index 1d556a0..68d0970 100644 --- a/selfdrive/ui/qt/home.cc +++ b/selfdrive/ui/qt/home.cc @@ -70,7 +70,7 @@ void HomeWindow::updateState(const UIState &s) { void HomeWindow::offroadTransition(bool offroad) { body->setEnabled(false); - sidebar->setVisible(offroad); + sidebar->setVisible(false); if (offroad) { slayout->setCurrentWidget(body); } else { @@ -85,14 +85,16 @@ void HomeWindow::showDriverView(bool show) { } else { slayout->setCurrentWidget(body); } - sidebar->setVisible(show == false); + sidebar->setVisible(false); } void HomeWindow::mousePressEvent(QMouseEvent* e) { // Handle sidebar collapsing if (body->isVisible()) { + showSidebar(true); slayout->setCurrentWidget(home); } else { + // ?? if ((onroad->isVisible() || body->isVisible()) && (!sidebar->isVisible() || e->x() > sidebar->width())) { sidebar->setVisible(!sidebar->isVisible() && !onroad->isMapVisible()); }