mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 20:13:24 -08:00
Apply suggestion from @ZeldaZach
Co-authored-by: Zach H <zahalpern+github@gmail.com>
This commit is contained in:
parent
aa91cac408
commit
24c973483c
1 changed files with 1 additions and 3 deletions
|
|
@ -85,9 +85,7 @@ void AltTableDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
|
|||
}
|
||||
|
||||
if (index.column() == activeColumn) {
|
||||
const QVariant activeData = index.data(Qt::UserRole);
|
||||
const bool active =
|
||||
activeData.isValid() ? activeData.toBool() : text.compare(QStringLiteral("yes"), Qt::CaseInsensitive) == 0;
|
||||
const bool active = index.data(Qt::UserRole).toBool();
|
||||
const QPalette::ColorRole tintRole = active ? QPalette::Highlight : QPalette::PlaceholderText;
|
||||
if (!pill_painter::paint(painter, opt, tintRole, emphasisRole, text)) {
|
||||
QStyledItemDelegate::paint(painter, opt, index);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue