diff --git a/selfdrive/ui/qt/sidebar.cc b/selfdrive/ui/qt/sidebar.cc index da226b412..c3fff1b90 100644 --- a/selfdrive/ui/qt/sidebar.cc +++ b/selfdrive/ui/qt/sidebar.cc @@ -2,7 +2,6 @@ #include -#include "selfdrive/ui/qt/qt_window.h" #include "selfdrive/common/util.h" #include "selfdrive/hardware/hw.h" #include "selfdrive/ui/qt/util.h" @@ -41,9 +40,9 @@ Sidebar::Sidebar(QWidget *parent) : QFrame(parent) { connect(this, &Sidebar::valueChanged, [=] { update(); }); + setAttribute(Qt::WA_OpaquePaintEvent); + setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); setFixedWidth(300); - setMinimumHeight(vwp_h); - setStyleSheet("background-color: rgb(57, 57, 57);"); } void Sidebar::mouseReleaseEvent(QMouseEvent *event) { @@ -103,6 +102,8 @@ void Sidebar::paintEvent(QPaintEvent *event) { p.setPen(Qt::NoPen); p.setRenderHint(QPainter::Antialiasing); + p.fillRect(rect(), QColor(57, 57, 57)); + // static imgs p.setOpacity(0.65); p.drawImage(settings_btn.x(), settings_btn.y(), settings_img);