mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 11:50:37 +02:00
Make grey text visible when highlighted in playlist delegate
This commit is contained in:
@@ -201,7 +201,11 @@ PlaylistItemDelegate::paintShort( QPainter* painter, const QStyleOptionViewItem&
|
|||||||
painter->drawText( r.adjusted( 0, 1, 0, 0 ), text, m_topOption );
|
painter->drawText( r.adjusted( 0, 1, 0, 0 ), text, m_topOption );
|
||||||
|
|
||||||
painter->setFont( opt.font );
|
painter->setFont( opt.font );
|
||||||
|
if ( option.state & QStyle::State_Selected )
|
||||||
|
painter->setPen( option.palette.color( QPalette::HighlightedText ) );
|
||||||
|
else
|
||||||
painter->setPen( Qt::gray );
|
painter->setPen( Qt::gray );
|
||||||
|
|
||||||
text = painter->fontMetrics().elidedText( lowerText, Qt::ElideRight, r.width() );
|
text = painter->fontMetrics().elidedText( lowerText, Qt::ElideRight, r.width() );
|
||||||
painter->drawText( r.adjusted( 0, 1, 0, 0 ), text, m_bottomOption );
|
painter->drawText( r.adjusted( 0, 1, 0, 0 ), text, m_bottomOption );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user