1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-04 21:27:58 +02:00

* Use the proper color for selected playlist items on the Dashboard.

This commit is contained in:
Christian Muehlhaeuser
2011-11-23 05:00:47 +01:00
parent 55ab72ee76
commit 004ea967ad

View File

@@ -330,12 +330,17 @@ PlaylistDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option,
if ( type == RecentlyPlayedPlaylistsModel::Station ) if ( type == RecentlyPlayedPlaylistsModel::Station )
{ {
descText = index.data( RecentlyPlayedPlaylistsModel::DynamicPlaylistRole ).value< Tomahawk::dynplaylist_ptr >()->generator()->sentenceSummary(); descText = index.data( RecentlyPlayedPlaylistsModel::DynamicPlaylistRole ).value< Tomahawk::dynplaylist_ptr >()->generator()->sentenceSummary();
} else }
else
{ {
descText = index.data( RecentlyPlayedPlaylistsModel::ArtistRole ).toString(); descText = index.data( RecentlyPlayedPlaylistsModel::ArtistRole ).toString();
} }
QColor c = painter->pen().color(); QColor c = painter->pen().color();
painter->setPen( QColor( Qt::gray ).darker() ); if ( !( option.state & QStyle::State_Selected && option.state & QStyle::State_Active ) )
{
painter->setPen( QColor( Qt::gray ).darker() );
}
QRect rectText = option.rect.adjusted( 66, 20, -leftEdge - 10, -8 ); QRect rectText = option.rect.adjusted( 66, 20, -leftEdge - 10, -8 );
#ifdef Q_WS_MAC #ifdef Q_WS_MAC