From db96d8e460526262acb76137b39ad439a637994c Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 14 Jun 2013 12:49:02 +0200 Subject: [PATCH] * Got rid of cover shadow / gradient. --- src/libtomahawk/playlist/GridItemDelegate.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/libtomahawk/playlist/GridItemDelegate.cpp b/src/libtomahawk/playlist/GridItemDelegate.cpp index 06e5e66b2..f4447f20e 100644 --- a/src/libtomahawk/playlist/GridItemDelegate.cpp +++ b/src/libtomahawk/playlist/GridItemDelegate.cpp @@ -179,23 +179,13 @@ GridItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, int topHeight = QFontMetrics( boldFont ).boundingRect( top ).height(); int frameHeight = bottomHeight + topHeight + 10; - QColor c1; - c1.setRgb( 0, 0, 0 ); - c1.setAlphaF( 0.00 ); - QColor c2; - c2.setRgb( 0, 0, 0 ); - c2.setAlphaF( 0.88 ); - - QRect gradientRect = r.adjusted( 0, r.height() - frameHeight * 2, 0, 0 ); - QLinearGradient gradient( QPointF( 0, 0 ), QPointF( 0, 1 ) ); - gradient.setCoordinateMode( QGradient::ObjectBoundingMode ); - gradient.setColorAt( 0.0, c1 ); - gradient.setColorAt( 0.6, c2 ); - gradient.setColorAt( 1.0, c2 ); + QRect gradientRect = r.adjusted( 0, r.height() - frameHeight * 1.2, 0, 0 ); + QColor gradientColor = opt.palette.background().color(); + gradientColor.setAlphaF( 0.66 ); painter->save(); painter->setPen( Qt::transparent ); - painter->setBrush( gradient ); + painter->setBrush( gradientColor ); painter->drawRect( gradientRect ); painter->restore();