mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-30 19:33:45 +08:00
only toggle sidebar visibility when clicking on the onroad widget
old-commit-hash: ee7682ae4a53d8b85872cf1f06e614c740edf9c9
This commit is contained in:
@@ -68,7 +68,7 @@ void HomeWindow::showDriverView(bool show) {
|
||||
|
||||
void HomeWindow::mousePressEvent(QMouseEvent* e) {
|
||||
// Handle sidebar collapsing
|
||||
if (onroad->isVisible()) {
|
||||
if (onroad->isVisible() && (!sidebar->isVisible() || e->x() > sidebar->width())) {
|
||||
sidebar->setVisible(!sidebar->isVisible() && !onroad->isMapVisible());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user