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

TWK-815: Try using foreground text color when drawing grey bg, white on grey is hard to read

This commit is contained in:
Leo Franchi 2012-03-30 13:34:48 -04:00
parent d623bbefc2
commit 73d7ba03f5

@ -104,10 +104,13 @@ PlaylistItemDelegate::prepareStyleOption( QStyleOptionViewItemV4* option, const
if ( item->isPlaying() )
{
option->palette.setColor( QPalette::Highlight, option->palette.color( QPalette::Mid ) );
option->state |= QStyle::State_Selected;
option->backgroundBrush = option->palette.color( QPalette::Mid );
option->palette.setColor( QPalette::Text, option->palette.color( QPalette::Text ) );
}
if ( option->state & QStyle::State_Selected )
if ( option->state & QStyle::State_Selected && !item->isPlaying() )
{
option->palette.setColor( QPalette::Text, option->palette.color( QPalette::HighlightedText ) );
}