diff --git a/src/sourcetree/sourcedelegate.cpp b/src/sourcetree/sourcedelegate.cpp index 2a41d4808..8ac4b25b2 100644 --- a/src/sourcetree/sourcedelegate.cpp +++ b/src/sourcetree/sourcedelegate.cpp @@ -189,8 +189,9 @@ SourceDelegate::paintCollection( QPainter* painter, const QStyleOptionViewItem& if ( desc.isEmpty() ) desc = tr( "Online" ); - textRect = option.rect.adjusted( iconRect.width() + 8, painter->fontMetrics().height() + 9, -figWidth - 24, -6 ); painter->setFont( normal ); + textRect = option.rect.adjusted( iconRect.width() + 8, option.rect.height() - ( painter->fontMetrics().height() + 7 ), -figWidth - 24, -6 ); + bool privacyOn = TomahawkSettings::instance()->privateListeningMode() == TomahawkSettings::FullyPrivate; if ( !colItem->source().isNull() && colItem->source()->isLocal() && privacyOn ) { @@ -198,7 +199,7 @@ SourceDelegate::paintCollection( QPainter* painter, const QStyleOptionViewItem& pmRect.setTop( pmRect.bottom() - painter->fontMetrics().height() + 3 ); pmRect.setRight( pmRect.left() + pmRect.height() ); ActionCollection::instance()->getAction( "togglePrivacy" )->icon().paint( painter, pmRect ); - textRect.adjust( pmRect.width() + 3, 0, 0, 0 ); + textRect.adjust( pmRect.width() + 3, 2, 0, 0 ); } if ( isPlaying || ( !colItem->source().isNull() && colItem->source()->isLocal() ) ) { @@ -227,7 +228,7 @@ SourceDelegate::paintCollection( QPainter* painter, const QStyleOptionViewItem& pmRect.setTop( pmRect.bottom() - painter->fontMetrics().height() + 3 ); pmRect.setRight( pmRect.left() + pmRect.height() ); painter->drawPixmap( pmRect, listenAlongPixmap.scaledToHeight( pmRect.height(), Qt::SmoothTransformation ) ); - textRect.adjust( pmRect.width() + 3, 0, 0, 0 ); + textRect.adjust( pmRect.width() + 3, 2, 0, 0 ); } if ( !realtimeListeningAlongPixmap.isNull() ) @@ -236,13 +237,13 @@ SourceDelegate::paintCollection( QPainter* painter, const QStyleOptionViewItem& pmRect.setTop( pmRect.bottom() - painter->fontMetrics().height() + 3 ); pmRect.setRight( pmRect.left() + pmRect.height() ); painter->drawPixmap( pmRect, realtimeListeningAlongPixmap.scaledToHeight( pmRect.height(), Qt::SmoothTransformation ) ); - textRect.adjust( pmRect.width() + 3, 0, 0, 0 ); + textRect.adjust( pmRect.width() + 3, 2, 0, 0 ); } } text = painter->fontMetrics().elidedText( desc, Qt::ElideRight, textRect.width() ); QTextOption to( Qt::AlignBottom ); - painter->drawText( textRect, text, to ); + painter->drawText( textRect.adjusted( 0, 0, 0, 2 ), text, to ); if ( status ) {