diff --git a/selfdrive/ui/qt/maps/map.cc b/selfdrive/ui/qt/maps/map.cc index c5437af30eea78..f7bde9435ca1c5 100644 --- a/selfdrive/ui/qt/maps/map.cc +++ b/selfdrive/ui/qt/maps/map.cc @@ -78,7 +78,7 @@ void MapWindow::hideEvent(QHideEvent *event) { QOpenGLWidget::hideEvent(event); } -void MapWindow::showEvent(QHideEvent *event) { +void MapWindow::showEvent(QShowEvent *event) { emit mapVisibilitySignal(true); QOpenGLWidget::showEvent(event); } diff --git a/selfdrive/ui/qt/maps/map.h b/selfdrive/ui/qt/maps/map.h index b34fca9be883a7..3185cb253d245d 100644 --- a/selfdrive/ui/qt/maps/map.h +++ b/selfdrive/ui/qt/maps/map.h @@ -81,7 +81,7 @@ class MapWindow : public QOpenGLWidget { void resizeGL(int w, int h) override; void hideEvent(QHideEvent *event); - void showEvent(QHideEvent *event); + void showEvent(QShowEvent *event); QMapboxGLSettings m_settings; QScopedPointer m_map; diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index 6f68fd00c1cfe2..f2ac007a76b0b0 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -155,11 +155,11 @@ void ButtonsWindow::updateState(const UIState &s) { } void ButtonsWindow::mapVisibilityChanged(bool visible) { - qDebug() << "Map visible:" << visible << "setting width to:" << width; + qDebug() << "Map visible:" << visible << "setting width to:" << width(); if (visible) { - buttons->setFixedWidth(width() / 2 - bdr_s); + setFixedWidth(width() / 2 - bdr_s); } else { - buttons->setFixedWidth(width() / 2 - bdr_s); + setFixedWidth(width() / 2 - bdr_s); } }