1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-25 02:09:48 +01:00

* Got rid of cover shadow / gradient.

This commit is contained in:
Christian Muehlhaeuser 2013-06-14 12:49:02 +02:00
parent e976774d52
commit db96d8e460

View File

@ -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();