mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-21 08:14:00 +08:00
Cabana: Improve contrast when using dark themes (#28389)
old-commit-hash: 7cb4adfebbb3c1a5901018f177bf87add7c0799b
This commit is contained in:
@@ -437,9 +437,11 @@ void BinaryItemDelegate::drawSignalCell(QPainter *painter, const QStyleOptionVie
|
||||
auto sig_color = getColor(sig);
|
||||
QColor color = sig_color;
|
||||
color.setAlpha(item->bg_color.alpha());
|
||||
painter->fillRect(rc, Qt::white);
|
||||
// Mixing the signal colour with the Base background color to fade it
|
||||
painter->fillRect(rc, QApplication::palette().color(QPalette::Base));
|
||||
painter->fillRect(rc, color);
|
||||
|
||||
// Draw edges
|
||||
color = sig_color.darker(125);
|
||||
painter->setPen(QPen(color, 1));
|
||||
if (draw_left) painter->drawLine(rc.topLeft(), rc.bottomLeft());
|
||||
|
||||
Reference in New Issue
Block a user