From f6179b92452aa1a5727316f98467600c40810f8c Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Thu, 28 Oct 2010 13:47:08 +0200 Subject: [PATCH] * Use the proper HighlightedText color when painting selected playlist items in the sidebar. --- src/sourcetree/sourcetreeview.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sourcetree/sourcetreeview.cpp b/src/sourcetree/sourcetreeview.cpp index 62f09e148..40ae6b22a 100644 --- a/src/sourcetree/sourcetreeview.cpp +++ b/src/sourcetree/sourcetreeview.cpp @@ -371,6 +371,12 @@ SourceDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, co if ( ( option.state & QStyle::State_Enabled ) == QStyle::State_Enabled ) { o.state = QStyle::State_Enabled; + + if ( SourcesModel::indexType( index ) == 1 && + ( option.state & QStyle::State_Selected ) == QStyle::State_Selected ) + { + o.palette.setColor( QPalette::Text, o.palette.color( QPalette::HighlightedText ) ); + } } QStyledItemDelegate::paint( painter, option, index.model()->index( 0, 0 ) );