Alerts: revert gradient removal (#28686)

revert gradient removal
old-commit-hash: dce060a7985b6aaf03d5ab1cc3d78c994ddc7700
This commit is contained in:
Harald Schäfer
2023-06-25 08:55:37 -07:00
committed by GitHub
parent 52d1de0e79
commit ff56008ecf
+9 -1
View File
@@ -142,10 +142,18 @@ void OnroadAlerts::paintEvent(QPaintEvent *event) {
// draw background + gradient
p.setPen(Qt::NoPen);
p.setCompositionMode(QPainter::CompositionMode_SourceOver);
p.setBrush(QBrush(alert_colors[alert.status]));
p.drawRoundedRect(r, radius, radius);
p.setCompositionMode(QPainter::CompositionMode_SourceOver);
QLinearGradient g(0, r.y(), 0, r.bottom());
g.setColorAt(0, QColor::fromRgbF(0, 0, 0, 0.05));
g.setColorAt(1, QColor::fromRgbF(0, 0, 0, 0.35));
p.setCompositionMode(QPainter::CompositionMode_DestinationOver);
p.setBrush(QBrush(g));
p.drawRoundedRect(r, radius, radius);
p.setCompositionMode(QPainter::CompositionMode_SourceOver);
// text
const QPoint c = r.center();