Cabana: Improve contrast when using dark themes (#28389)

old-commit-hash: 7cb4adfebbb3c1a5901018f177bf87add7c0799b
This commit is contained in:
Angus Gratton
2023-06-07 15:22:06 +10:00
committed by GitHub
parent 5cbd015f3a
commit f2ed4745c4
4 changed files with 22 additions and 4 deletions
+3 -1
View File
@@ -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());