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:
@@ -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();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user