1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 22:26:32 +02:00

* This should fix candy striping in TrackViews.

This commit is contained in:
Christian Muehlhaeuser
2011-03-16 05:18:00 +01:00
parent 0aca34a1c2
commit af576cf1e7

View File

@@ -54,6 +54,7 @@ PlaylistItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& opti
if ( !item || item->query().isNull() ) if ( !item || item->query().isNull() )
return; return;
painter->save();
if ( item->query()->results().count() ) if ( item->query()->results().count() )
painter->setOpacity( item->query()->results().at( 0 )->score() ); painter->setOpacity( item->query()->results().at( 0 )->score() );
else else
@@ -64,7 +65,6 @@ PlaylistItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& opti
if ( item->isPlaying() ) if ( item->isPlaying() )
{ {
painter->save();
// painter->setRenderHint( QPainter::Antialiasing ); // painter->setRenderHint( QPainter::Antialiasing );
{ {
@@ -92,11 +92,11 @@ PlaylistItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& opti
painter->setPen( pen ); painter->setPen( pen );
painter->drawRoundedRect( r, 3.0, 3.0 ); painter->drawRoundedRect( r, 3.0, 3.0 );
} }
painter->restore();
} }
else else
{ {
QStyledItemDelegate::paint( painter, option, index ); QStyledItemDelegate::paint( painter, option, index );
} }
painter->restore();
} }