diff --git a/src/gui/activityitemdelegate.cpp b/src/gui/activityitemdelegate.cpp index 2d86ba961..e625b9736 100644 --- a/src/gui/activityitemdelegate.cpp +++ b/src/gui/activityitemdelegate.cpp @@ -122,6 +122,16 @@ void ActivityItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem & pm = userIcon.pixmap(iconWidth, iconHeight, QIcon::Normal); painter->drawPixmap(QPoint(userIconRect.left(), userIconRect.top()), pm); + QPalette::ColorGroup cg = option.state & QStyle::State_Enabled + ? QPalette::Normal : QPalette::Disabled; + if (cg == QPalette::Normal && !(option.state & QStyle::State_Active)) + cg = QPalette::Inactive; + if (option.state & QStyle::State_Selected) { + painter->setPen(option.palette.color(cg, QPalette::HighlightedText)); + } else { + painter->setPen(option.palette.color(cg, QPalette::Text)); + } + const QString elidedAction = fm.elidedText(actionText, Qt::ElideRight, actionTextBox.width()); painter->drawText(actionTextBox, elidedAction);