diff --git a/src/libtomahawk/playlist/TreeItemDelegate.cpp b/src/libtomahawk/playlist/TreeItemDelegate.cpp index 5122564a0..ea991cad3 100644 --- a/src/libtomahawk/playlist/TreeItemDelegate.cpp +++ b/src/libtomahawk/playlist/TreeItemDelegate.cpp @@ -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; } diff --git a/src/libtomahawk/utils/TomahawkUtilsGui.cpp b/src/libtomahawk/utils/TomahawkUtilsGui.cpp index 1ec7c9f63..6376171bc 100644 --- a/src/libtomahawk/utils/TomahawkUtilsGui.cpp +++ b/src/libtomahawk/utils/TomahawkUtilsGui.cpp @@ -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 ) ); } diff --git a/src/libtomahawk/utils/TomahawkUtilsGui.h b/src/libtomahawk/utils/TomahawkUtilsGui.h index 037f4bbed..4b2e97e7b 100644 --- a/src/libtomahawk/utils/TomahawkUtilsGui.h +++ b/src/libtomahawk/utils/TomahawkUtilsGui.h @@ -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;