diff --git a/selfdrive/ui/qt/home.cc b/selfdrive/ui/qt/home.cc index 1b8543a..2424309 100644 --- a/selfdrive/ui/qt/home.cc +++ b/selfdrive/ui/qt/home.cc @@ -17,6 +17,10 @@ // HomeWindow: the container for the offroad and onroad UIs HomeWindow::HomeWindow(QWidget* parent) : QWidget(parent) { + _parent = parent; + // Start hidden at first + _parent->setVisible(false); + // CLEARPILOT Sidebar set to invisible in drive view. params.putBool("Sidebar", false); @@ -52,7 +56,9 @@ HomeWindow::HomeWindow(QWidget* parent) : QWidget(parent) { showDriverView(false); }); slayout->addWidget(driver_view); + setAttribute(Qt::WA_NoSystemBackground); + QObject::connect(uiState(), &UIState::uiUpdate, this, &HomeWindow::updateState); QObject::connect(uiState(), &UIState::offroadTransition, this, &HomeWindow::offroadTransition); QObject::connect(uiState(), &UIState::offroadTransition, sidebar, &Sidebar::offroadTransition); @@ -92,9 +98,11 @@ void HomeWindow::offroadTransition(bool offroad) { slayout->setCurrentWidget(onroad); uiState()->scene.map_open = onroad->isMapVisible(); } + _parent->setVisible(true); } void HomeWindow::showDriverView(bool show, bool started) { + _parent->setVisible(true); if (show) { emit closeSettings(); slayout->setCurrentWidget(driver_view); @@ -121,6 +129,7 @@ void HomeWindow::mousePressEvent(QMouseEvent* e) { // params.putBool("Sidebar", sidebar->isVisible()); // } + // CLEARPILOT - click ready shows home if (!onroad->isVisible() && ready->isVisible()) { sidebar->setVisible(true); diff --git a/selfdrive/ui/qt/home.h b/selfdrive/ui/qt/home.h index 978670d..8202b79 100644 --- a/selfdrive/ui/qt/home.h +++ b/selfdrive/ui/qt/home.h @@ -50,6 +50,7 @@ class HomeWindow : public QWidget { public: explicit HomeWindow(QWidget* parent = 0); + QWidget* _parent = 0 signals: void openSettings(int index = 0, const QString ¶m = "");