1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-31 06:02:27 +02:00

* Don't scale now playing icon decoration when expanding a playlist item.

This commit is contained in:
Christian Muehlhaeuser 2012-06-26 03:44:03 +02:00
parent fa52f8a75c
commit dbd137a561

View File

@ -134,7 +134,16 @@ SourceDelegate::paintDecorations( QPainter* painter, const QStyleOptionViewItem&
if ( playable && playing && item->isBeingPlayed() )
{
const int iconW = option.rect.height() - 4;
int iconW = option.rect.height() - 4;
if ( m_expandedMap.contains( index ) )
{
AnimationHelper* ah = m_expandedMap.value( index );
if ( ah->initialized() )
{
iconW = ah->originalSize().height() - 4;
}
}
QRect iconRect = QRect( 4, option.rect.y() + 2, iconW, iconW );
QPixmap speaker = option.state & QStyle::State_Selected ? m_nowPlayingSpeaker : m_nowPlayingSpeakerDark;
speaker = speaker.scaledToHeight( iconW, Qt::SmoothTransformation );