wip
This commit is contained in:
@@ -70,7 +70,7 @@ void HomeWindow::updateState(const UIState &s) {
|
|||||||
|
|
||||||
void HomeWindow::offroadTransition(bool offroad) {
|
void HomeWindow::offroadTransition(bool offroad) {
|
||||||
body->setEnabled(false);
|
body->setEnabled(false);
|
||||||
sidebar->setVisible(offroad);
|
sidebar->setVisible(false);
|
||||||
if (offroad) {
|
if (offroad) {
|
||||||
slayout->setCurrentWidget(body);
|
slayout->setCurrentWidget(body);
|
||||||
} else {
|
} else {
|
||||||
@@ -85,14 +85,16 @@ void HomeWindow::showDriverView(bool show) {
|
|||||||
} else {
|
} else {
|
||||||
slayout->setCurrentWidget(body);
|
slayout->setCurrentWidget(body);
|
||||||
}
|
}
|
||||||
sidebar->setVisible(show == false);
|
sidebar->setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HomeWindow::mousePressEvent(QMouseEvent* e) {
|
void HomeWindow::mousePressEvent(QMouseEvent* e) {
|
||||||
// Handle sidebar collapsing
|
// Handle sidebar collapsing
|
||||||
if (body->isVisible()) {
|
if (body->isVisible()) {
|
||||||
|
showSidebar(true);
|
||||||
slayout->setCurrentWidget(home);
|
slayout->setCurrentWidget(home);
|
||||||
} else {
|
} else {
|
||||||
|
// ??
|
||||||
if ((onroad->isVisible() || body->isVisible()) && (!sidebar->isVisible() || e->x() > sidebar->width())) {
|
if ((onroad->isVisible() || body->isVisible()) && (!sidebar->isVisible() || e->x() > sidebar->width())) {
|
||||||
sidebar->setVisible(!sidebar->isVisible() && !onroad->isMapVisible());
|
sidebar->setVisible(!sidebar->isVisible() && !onroad->isMapVisible());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user