mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
* Make sure we always set our custom foreground color on now-playing items.
This commit is contained in:
@@ -84,9 +84,9 @@ TreeItemDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
|
||||
if ( item->isPlaying() )
|
||||
{
|
||||
textColor = TomahawkUtils::Colors::NOW_PLAYING_ITEM_TEXT;
|
||||
o.palette.setColor( QPalette::Highlight, TomahawkUtils::Colors::NOW_PLAYING_ITEM );
|
||||
if ( o.state & QStyle::State_Selected )
|
||||
o.palette.setColor( QPalette::Text, textColor );
|
||||
o.palette.setColor( QPalette::Text, TomahawkUtils::Colors::NOW_PLAYING_ITEM_TEXT );
|
||||
o.state |= QStyle::State_Selected;
|
||||
}
|
||||
|
||||
|
@@ -721,14 +721,12 @@ prepareStyleOption( QStyleOptionViewItemV4* option, const QModelIndex& index, Pl
|
||||
|
||||
if ( item->isPlaying() )
|
||||
{
|
||||
option->palette.setColor( QPalette::Highlight, TomahawkUtils::Colors::NOW_PLAYING_ITEM.lighter() );
|
||||
option->backgroundBrush = TomahawkUtils::Colors::NOW_PLAYING_ITEM;
|
||||
|
||||
option->palette.setColor( QPalette::Text, Qt::white );
|
||||
option->palette.setColor( QPalette::Highlight, TomahawkUtils::Colors::NOW_PLAYING_ITEM.lighter() );
|
||||
option->palette.setColor( QPalette::Text, TomahawkUtils::Colors::NOW_PLAYING_ITEM_TEXT );
|
||||
|
||||
}
|
||||
|
||||
if ( option->state & QStyle::State_Selected && !item->isPlaying() )
|
||||
else if ( option->state & QStyle::State_Selected )
|
||||
{
|
||||
option->palette.setColor( QPalette::Text, option->palette.color( QPalette::HighlightedText ) );
|
||||
}
|
||||
|
@@ -83,6 +83,7 @@ namespace TomahawkUtils
|
||||
static const QColor POPUP_BACKGROUND = QColor( "#ffffff" );
|
||||
static const QColor GROUP_HEADER = QColor( "#637180" );
|
||||
static const QColor NOW_PLAYING_ITEM = QColor( "#962c26" );
|
||||
static const QColor NOW_PLAYING_ITEM_TEXT = QColor( "#ffffff" );
|
||||
}
|
||||
|
||||
static const int POPUP_ROUNDING_RADIUS = 6;
|
||||
|
Reference in New Issue
Block a user