@@ -217,10 +217,7 @@ void OnroadWindow::offroadTransition(bool offroad) {
217
217
218
218
void OnroadWindow::paintEvent (QPaintEvent *event) {
219
219
QPainter p (this );
220
-
221
- QPainterPath path;
222
- path.addRoundedRect (rect (), 40 , 40 );
223
- p.fillPath (path, QColor (bg.red (), bg.green (), bg.blue (), 255 ));
220
+ p.fillRect (rect (), QColor (bg.red (), bg.green (), bg.blue (), 255 ));
224
221
}
225
222
226
223
// ***** onroad widgets *****
@@ -633,11 +630,7 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) {
633
630
QLinearGradient bg (0 , header_h - (header_h / 2.5 ), 0 , header_h);
634
631
bg.setColorAt (0 , QColor::fromRgbF (0 , 0 , 0 , 0.45 ));
635
632
bg.setColorAt (1 , QColor::fromRgbF (0 , 0 , 0 , 0 ));
636
-
637
- QRect headerRect (0 , 0 , width (), header_h);
638
- QPainterPath headerPath;
639
- headerPath.addRoundedRect (headerRect, 30 , 30 );
640
- p.fillPath (headerPath, bg);
633
+ p.fillRect (0 , 0 , width (), header_h, bg);
641
634
642
635
QString speedLimitStr = (speedLimit > 1 ) ? QString::number (std::nearbyint (speedLimit)) : " –" ;
643
636
QString speedLimitStrSlc = showSpeedLimit ? QString::number (std::nearbyint (speedLimitSLC)) : " –" ;
@@ -1868,17 +1861,6 @@ void AnnotatedCameraWidget::paintEvent(QPaintEvent *event) {
1868
1861
CameraWidget::updateCalibration (DEFAULT_CALIBRATION);
1869
1862
}
1870
1863
painter.beginNativePainting ();
1871
-
1872
- // Create a QPainterPath with rounded corners
1873
- QPainterPath path;
1874
- int radius = 30 ;
1875
- int width = CameraWidget::width ();
1876
- int height = CameraWidget::height ();
1877
- path.addRoundedRect (0 , 0 , width, height, radius, radius);
1878
-
1879
- // Set the path as the clipping region for the painter
1880
- painter.setClipPath (path);
1881
-
1882
1864
CameraWidget::setFrameId (model.getFrameId ());
1883
1865
CameraWidget::paintGL ();
1884
1866
painter.endNativePainting ();
@@ -1887,8 +1869,6 @@ void AnnotatedCameraWidget::paintEvent(QPaintEvent *event) {
1887
1869
painter.setRenderHint (QPainter::Antialiasing);
1888
1870
painter.setPen (Qt::NoPen);
1889
1871
1890
- setBackgroundColor (bg_colors[s->status ]);
1891
-
1892
1872
if (s->worldObjectsVisible ()) {
1893
1873
if (sm.rcv_frame (" modelV2" ) > s->scene .started_frame ) {
1894
1874
update_model (s, sm[" modelV2" ].getModelV2 (), sm[" uiPlan" ].getUiPlan ());
0 commit comments