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