wip
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user