This commit is contained in:
Your Name
2024-02-14 00:42:24 -06:00
parent 0c5da80a05
commit a6fd1bfe03
7 changed files with 57 additions and 7 deletions

View File

@@ -89,12 +89,11 @@ void HomeWindow::showDriverView(bool show) {
}
void HomeWindow::mousePressEvent(QMouseEvent* e) {
// Handle sidebar collapsing
if (body->isVisible()) {
showSidebar(true);
slayout->setCurrentWidget(home);
} else {
// ??
// Handle sidebar collapsing
if ((onroad->isVisible() || body->isVisible()) && (!sidebar->isVisible() || e->x() > sidebar->width())) {
sidebar->setVisible(!sidebar->isVisible() && !onroad->isMapVisible());
}

View File

@@ -29,6 +29,9 @@
#include "selfdrive/frogpilot/ui/vehicle_settings.h"
#include "selfdrive/frogpilot/ui/visual_settings.h"
// Bbot notes:
// This is the main settings page. All other settings pages attach themselves to this page.
TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
// param, title, desc, icon
std::vector<std::tuple<QString, QString, QString, QString>> toggle_defs{

View File

@@ -93,7 +93,11 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event) {
case QEvent::MouseMove: {
// ignore events when device is awakened by resetInteractiveTimeout
ignore = !device()->isAwake();
device()->resetInteractiveTimeout();
if (main_layout->currentWidget() == settingsWindow) {
device()->resetInteractiveTimeout(60 * 5); // 5 minute timeout if looking at settings window
} else {
device()->resetInteractiveTimeout(); // Default 30 seconds otherwise
}
break;
}
default: