1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-13 20:39:57 +01:00

* Show now playing speaker next to current playlist again.

This commit is contained in:
Christian Muehlhaeuser 2012-02-24 05:18:55 +01:00
parent a04d384ac4
commit b2fc0935a4

View File

@ -132,7 +132,7 @@ SourceDelegate::paintDecorations( QPainter* painter, const QStyleOptionViewItem&
if ( playable && playing && item->isBeingPlayed() )
{
const int iconW = option.rect.height() - 4;
QRect iconRect = QRect( option.rect.x() - iconW - 4, option.rect.y() + 2, iconW, iconW );
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 );
painter->drawPixmap( iconRect, speaker );
@ -406,8 +406,6 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
if ( type != SourcesModel::Group && type != SourcesModel::Category && type != SourcesModel::Divider )
QApplication::style()->drawControl( QStyle::CE_ItemViewItem, &o3, painter );
paintDecorations( painter, o3, index );
if ( type == SourcesModel::Collection )
{
paintCollection( painter, o, index );
@ -538,6 +536,8 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
}
}
paintDecorations( painter, o3, index );
painter->restore();
}