onroad UI optimizations (#20871)

* onroad UI optimizations

* remove that

Co-authored-by: Comma Device <device@comma.ai>
pull/20874/head
Adeeb Shihadeh 2021-05-10 23:19:32 -07:00 committed by GitHub
parent 38741b2e08
commit 5f5bbd64f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -25,6 +25,7 @@ OnroadWindow::OnroadWindow(QWidget *parent) : QWidget(parent) {
alerts->raise();
setLayout(layout);
setAttribute(Qt::WA_OpaquePaintEvent);
}
// ***** onroad widgets *****
@ -166,6 +167,11 @@ void OnroadAlerts::paintEvent(QPaintEvent *event) {
}
}
NvgWindow::NvgWindow(QWidget *parent) : QOpenGLWidget(parent) {
setAttribute(Qt::WA_OpaquePaintEvent);
}
NvgWindow::~NvgWindow() {
makeCurrent();
doneCurrent();

View File

@ -60,7 +60,7 @@ class NvgWindow : public QOpenGLWidget, protected QOpenGLFunctions {
public:
using QOpenGLWidget::QOpenGLWidget;
explicit NvgWindow(QWidget* parent = 0) : QOpenGLWidget(parent) {};
explicit NvgWindow(QWidget* parent = 0);
~NvgWindow();
protected: