From c6a65a5ba4dfeaf195f2f8bc6827c66fc614594a Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Sat, 6 Aug 2011 20:35:37 -0400 Subject: [PATCH] Use a lighter color on os x as highlight color for score bar is way too bright. --- src/libtomahawk/playlist/playlistitemdelegate.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/libtomahawk/playlist/playlistitemdelegate.cpp b/src/libtomahawk/playlist/playlistitemdelegate.cpp index fddeca85a..07332c53e 100644 --- a/src/libtomahawk/playlist/playlistitemdelegate.cpp +++ b/src/libtomahawk/playlist/playlistitemdelegate.cpp @@ -261,10 +261,15 @@ PlaylistItemDelegate::paintDetailed( QPainter* painter, const QStyleOptionViewIt if ( index.column() == TrackModel::Score ) { +#ifdef Q_OS_MAC // On Mac, highlight color is very bright and stands out a lot + QColor barColor( 167, 183, 211 ); // This matches the sidebar (sourcetreeview.cpp:672) +#else + QColor barColor = opt.palette.highlight().color(); +#endif if ( opt.state & QStyle::State_Selected ) painter->setPen( opt.palette.brightText().color() ); else - painter->setPen( opt.palette.highlight().color() ); + painter->setPen( barColor ); QRect r = opt.rect.adjusted( 3, 3, -6, -4 ); painter->drawRect( r ); @@ -276,7 +281,7 @@ PlaylistItemDelegate::paintDetailed( QPainter* painter, const QStyleOptionViewIt if ( opt.state & QStyle::State_Selected ) painter->setBrush( opt.palette.brightText().color() ); else - painter->setBrush( opt.palette.highlight().color() ); + painter->setBrush( barColor ); painter->drawRect( fillR ); }