summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/Roster')
-rw-r--r--Swift/QtUI/Roster/RosterDelegate.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Swift/QtUI/Roster/RosterDelegate.cpp b/Swift/QtUI/Roster/RosterDelegate.cpp
index 1b7857e..2abace2 100644
--- a/Swift/QtUI/Roster/RosterDelegate.cpp
+++ b/Swift/QtUI/Roster/RosterDelegate.cpp
@@ -46,8 +46,11 @@ void RosterDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option
void RosterDelegate::paintGroup(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const {
painter->save();
- //QLinearGradient
- QBrush backgroundBrush = QBrush(index.data(Qt::BackgroundColorRole).value<QColor>(), Qt::SolidPattern);
+ QLinearGradient fillGradient(option.rect.topLeft(), option.rect.bottomLeft());
+ fillGradient.setColorAt(0, QColor(200, 200, 200));
+ fillGradient.setColorAt(0.5, QColor(150, 150, 150));
+ fillGradient.setColorAt(1, QColor(200, 200, 200));
+ QBrush backgroundBrush = QBrush(fillGradient);
painter->setPen(QPen(index.data(Qt::TextColorRole).value<QColor>()));
QPainterPath roundedPath;
roundedPath.addRoundedRect(option.rect, 5, 5);