mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-16 19:31:02 +01:00
Ignore custom playlist row colours for the currently playing item - they might clash with the glowing current track indicator. Fixes issue 3042.
This commit is contained in:
parent
73792668eb
commit
de782c980d
@ -296,6 +296,12 @@ QVariant Playlist::data(const QModelIndex& index, int role) const {
|
||||
return QVariant(column_alignments_.value(index.column(), (Qt::AlignLeft | Qt::AlignVCenter)));
|
||||
|
||||
case Qt::ForegroundRole:
|
||||
if (data(index, Role_IsCurrent).toBool()) {
|
||||
// Ignore any custom colours for the currently playing item - they might
|
||||
// clash with the glowing current track indicator.
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
if (items_[index.row()]->HasCurrentForegroundColor()) {
|
||||
return QBrush(items_[index.row()]->GetCurrentForegroundColor());
|
||||
}
|
||||
@ -305,6 +311,12 @@ QVariant Playlist::data(const QModelIndex& index, int role) const {
|
||||
return QVariant();
|
||||
|
||||
case Qt::BackgroundRole:
|
||||
if (data(index, Role_IsCurrent).toBool()) {
|
||||
// Ignore any custom colours for the currently playing item - they might
|
||||
// clash with the glowing current track indicator.
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
if (items_[index.row()]->HasCurrentBackgroundColor()) {
|
||||
return QBrush(items_[index.row()]->GetCurrentBackgroundColor());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user