1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

Make grey text visible when highlighted in playlist delegate

This commit is contained in:
Leo Franchi 2012-06-10 17:29:56 +02:00
parent 99d84c6489
commit 4bc703b477

View File

@ -201,7 +201,11 @@ PlaylistItemDelegate::paintShort( QPainter* painter, const QStyleOptionViewItem&
painter->drawText( r.adjusted( 0, 1, 0, 0 ), text, m_topOption );
painter->setFont( opt.font );
painter->setPen( Qt::gray );
if ( option.state & QStyle::State_Selected )
painter->setPen( option.palette.color( QPalette::HighlightedText ) );
else
painter->setPen( Qt::gray );
text = painter->fontMetrics().elidedText( lowerText, Qt::ElideRight, r.width() );
painter->drawText( r.adjusted( 0, 1, 0, 0 ), text, m_bottomOption );
}