1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-04 21:27:58 +02:00

Don't show speaker next to a playlist if not paused or playing

This commit is contained in:
Leo Franchi
2011-11-18 17:37:53 -05:00
parent 362f8fc622
commit 115c618fc2

View File

@@ -144,8 +144,8 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
type == SourcesModel::Station || type == SourcesModel::Station ||
type == SourcesModel::TemporaryPage || type == SourcesModel::TemporaryPage ||
type == SourcesModel::GenericPage ); type == SourcesModel::GenericPage );
const bool playing = ( AudioEngine::instance()->isPlaying() || AudioEngine::instance()->isPaused() );
if ( playable && item->isBeingPlayed() ) if ( playable && playing && item->isBeingPlayed() )
{ {
const int iconW = o3.rect.height() - 4; const int iconW = o3.rect.height() - 4;
QRect iconRect = QRect( option.rect.x() - iconW - 4, option.rect.y() + 2, iconW, iconW ); QRect iconRect = QRect( option.rect.x() - iconW - 4, option.rect.y() + 2, iconW, iconW );