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:
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 ) );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user