1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 19:30:21 +02:00

* Use the proper HighlightedText color when painting selected playlist items in the sidebar.

This commit is contained in:
Christian Muehlhaeuser
2010-10-28 13:47:08 +02:00
parent b41205e2f7
commit f6179b9245

View File

@@ -371,6 +371,12 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co
if ( ( option.state & QStyle::State_Enabled ) == QStyle::State_Enabled )
{
o.state = QStyle::State_Enabled;
if ( SourcesModel::indexType( index ) == 1 &&
( option.state & QStyle::State_Selected ) == QStyle::State_Selected )
{
o.palette.setColor( QPalette::Text, o.palette.color( QPalette::HighlightedText ) );
}
}
QStyledItemDelegate::paint( painter, option, index.model()->index( 0, 0 ) );