Visuals: Remove Navigation Full Screen toggle (#80)

This commit is contained in:
Jason Wen
2023-05-29 02:05:33 -04:00
committed by GitHub
parent eba305649d
commit 5f01dca186
3 changed files with 1 additions and 26 deletions
@@ -635,9 +635,6 @@ SPVisualsPanel::SPVisualsPanel(QWidget *parent) : QWidget(parent) {
"../assets/offroad/icon_calibration.png"
));
// Mapbox
mapboxMain = new QWidget();
mapboxSub = new QVBoxLayout(mapboxMain);
// Visuals: Enable Mapbox Navigation
customMapbox = new ParamControl(
"CustomMapbox",
@@ -660,24 +657,8 @@ SPVisualsPanel::SPVisualsPanel(QWidget *parent) : QWidget(parent) {
Hardware::reboot();
}
});
mapboxFullScreen = new ParamControl(
"MapboxFullScreen",
"Display Navigation Full Screen",
"Enable this will display the built-in navigation in full screen.\nTo switch back to driving view, tap on the border edge.",
"../assets/offroad/icon_blank.png"
);
connect(mapboxFullScreen, &ToggleControl::toggleFlipped, [=](bool state) {
ConfirmationDialog::alert("\"Enable Mapbox Navigation\"\nEnable this will display the built-in navigation in full screen.\nTo switch back to driving view, tap on the border edge.", this);
});
mapboxSub->setContentsMargins(QMargins());
mapboxSub->addWidget(horizontal_line());
mapboxSub->addWidget(mapboxFullScreen);
QObject::connect(customMapbox, &ToggleControl::toggleFlipped, [=](bool state) {
updateToggles();
});
main_layout->addWidget(horizontal_line());
main_layout->addWidget(customMapbox);
main_layout->addWidget(mapboxMain);
// Visuals: Speedometer: Display True Speed
main_layout->addWidget(horizontal_line());
@@ -718,9 +699,6 @@ void SPVisualsPanel::showEvent(QShowEvent *event) {
void SPVisualsPanel::updateToggles() {
devUiMain->setVisible(params.getBool("DevUI"));
devUiMain->update();
mapboxMain->setVisible(params.getBool("CustomMapbox"));
mapboxMain->update();
}
// Max Time Offroad (Shutdown timer)
@@ -133,12 +133,9 @@ private:
QWidget *devUiMain;
QVBoxLayout *devUiSub;
QWidget *mapboxMain;
QVBoxLayout *mapboxSub;
ParamControl *devUi;
ParamControl *customMapbox;
ParamControl *mapboxFullScreen;
void updateToggles();
};
+1 -1
View File
@@ -200,7 +200,7 @@ void OnroadWindow::offroadTransition(bool offroad) {
QObject::connect(uiState(), &UIState::offroadTransition, m, &MapWindow::offroadTransition);
m->setFixedWidth(topWidget(this)->width() / (Params().getBool("MapboxFullScreen")? 1 : 2));
m->setFixedWidth(topWidget(this)->width() / 2);
split->insertWidget(0, m);
// Make map visible after adding to split