diff options
-rw-r--r-- | Swift/QtUI/Roster/DelegateCommons.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Swift/QtUI/Roster/DelegateCommons.cpp b/Swift/QtUI/Roster/DelegateCommons.cpp index a8dd8a7..e4a2f46 100644 --- a/Swift/QtUI/Roster/DelegateCommons.cpp +++ b/Swift/QtUI/Roster/DelegateCommons.cpp @@ -23,15 +23,14 @@ void DelegateCommons::drawElidedText(QPainter* painter, const QRect& region, con void DelegateCommons::paintContact(QPainter* painter, const QStyleOptionViewItem& option, const QColor& nameColor, const QString& avatarPath, const QIcon& presenceIcon, const QString& name, const QString& statusText, bool isIdle, int unreadCount, bool compact) const { painter->save(); QRect fullRegion(option.rect); - QPen secondLineColor; if ( option.state & QStyle::State_Selected ) { painter->fillRect(fullRegion, option.palette.highlight()); painter->setPen(option.palette.highlightedText().color()); - secondLineColor = painter->pen().color().darker(125); } else { painter->setPen(QPen(nameColor)); - secondLineColor = painter->pen().color().lighter(); } + auto secondLineColor = painter->pen().color(); + secondLineColor.setAlphaF(0.7); QRect presenceIconRegion(QPoint(farLeftMargin, fullRegion.top()), QSize(presenceIconWidth, fullRegion.height() - verticalMargin)); |