From a7e67d1185c18d890d77f4bfaa079252bbd43c2d Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Wed, 26 Aug 2009 23:23:31 +0100
Subject: Gradient the group headers in the roster.


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);
-- 
cgit v0.10.2-6-g49f6