mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-29 02:22:09 +08:00
Alerts: revert gradient removal (#28686)
revert gradient removal old-commit-hash: dce060a7985b6aaf03d5ab1cc3d78c994ddc7700
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user