1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-05 08:32:42 +02:00

Avoid mysterious constants of doom in delegates.

This commit is contained in:
Teo Mrnjavac 2013-04-26 07:07:51 +02:00
parent 161e287877
commit 8c4f6d7917

View File

@ -172,13 +172,13 @@ PlaylistLargeItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem&
if ( item->isPlaying() )
{
painter->drawPixmap( npr, TomahawkUtils::defaultPixmap( TomahawkUtils::NowPlayingSpeaker, TomahawkUtils::Original, npr.size() ) );
r.adjust( pixHeight + 8, 0, 0, 0 );
r.adjust( pixHeight + 2*pixMargin, 0, 0, 0 );
}
else
{
npr = npr.adjusted( 0, npr.height() / 4, -npr.width() / 2, -npr.height() / 4 );
painter->drawPixmap( npr, TomahawkUtils::defaultPixmap( TomahawkUtils::InboxNewItem, TomahawkUtils::Original, npr.size() ) );
r.adjust( npr.width() + 8, 0, 0, 0 );
r.adjust( npr.width() + 2*pixMargin, 0, 0, 0 );
}
}