added full screen nav

This commit is contained in:
Rick Lan
2024-06-12 13:28:48 +08:00
parent 9424caab25
commit 403db43ccb
2 changed files with 8 additions and 1 deletions

View File

@@ -52,6 +52,8 @@ OnroadWindow::OnroadWindow(QWidget *parent) : QWidget(parent) {
#ifdef DP
border_indicator = new BorderIndicator;
#endif
// rick - read full screen param
dp_nav_full_screen = Params().getBool("dp_nav_full_screen");
}
void OnroadWindow::updateState(const UIState &s) {
@@ -104,7 +106,11 @@ void OnroadWindow::createMapWidget() {
QObject::connect(nvg->map_settings_btn, &MapSettingsButton::clicked, m, &MapPanel::toggleMapSettings);
nvg->map_settings_btn->setEnabled(true);
m->setFixedWidth(topWidget(this)->width() / 2 - UI_BORDER_SIZE);
if (dp_nav_full_screen) {
m->setFixedWidth(topWidget(this)->width());
} else {
m->setFixedWidth(topWidget(this)->width() / 2 - UI_BORDER_SIZE);
}
split->insertWidget(0, m);
// hidden by default, made visible when navRoute is published
m->setVisible(false);

View File

@@ -25,6 +25,7 @@ private:
QHBoxLayout* split;
// dp
bool dp_nav_full_screen = false;
#ifdef DP
BorderIndicator *border_indicator;
#endif