mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
TWK-815: Try using foreground text color when drawing grey bg, white on grey is hard to read
This commit is contained in:
@@ -104,10 +104,13 @@ PlaylistItemDelegate::prepareStyleOption( QStyleOptionViewItemV4* option, const
|
|||||||
if ( item->isPlaying() )
|
if ( item->isPlaying() )
|
||||||
{
|
{
|
||||||
option->palette.setColor( QPalette::Highlight, option->palette.color( QPalette::Mid ) );
|
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 ) );
|
option->palette.setColor( QPalette::Text, option->palette.color( QPalette::HighlightedText ) );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user