merge bitcoin#16153: Add antialiasing to traffic graph widget

This commit is contained in:
Kittywhiskers Van Gogh 2021-11-08 20:20:39 +03:00
parent a9997c778e
commit 6f98a32403

View File

@ -125,6 +125,7 @@ void TrafficGraphWidget::paintEvent(QPaintEvent *)
const TrafficGraphData::SampleQueue& queue = trafficGraphData.getCurrentRangeQueueWithAverageBandwidth();
if(!queue.empty()) {
painter.setRenderHint(QPainter::Antialiasing);
QPainterPath pIn;
QColor lucentGreen = green;
lucentGreen.setAlpha(128);
@ -142,6 +143,7 @@ void TrafficGraphWidget::paintEvent(QPaintEvent *)
painter.fillPath(pOut, lucentRed);
painter.setPen(red);
painter.drawPath(pOut);
painter.setRenderHint(QPainter::Antialiasing, false);
}
// draw text