Fix packet dump view bg color when using dark theme

Qt already paints the background before calling the paint event, so we
don't need to repaint it.
This commit is contained in:
Srivats P 2022-02-07 21:44:40 +05:30
parent ac52844b3f
commit 7dd070fd98

View File

@ -262,8 +262,10 @@ void DumpView::paintEvent(QPaintEvent* /*event*/)
// FIXME(LOW): unable to set the self widget's font in constructor
painter.setFont(QFont("Courier"));
// set a white background
painter.fillRect(rect(), QBrush(QColor(Qt::white)));
// Qt automatically clears the background before we are called
// QWidget::paintEvent doc:
// When the paint event occurs, the update region has normally
// been erased, so you are painting on the widget's background.
if (model())
{