chore: vary visibility of seen content
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
#include "networkstreammodel.h"
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
|
||||
NetworkStreamModel::NetworkStreamModel(Data *data, QObject *parent) : QAbstractItemModel(parent), m_data(data)
|
||||
{
|
||||
@@ -142,6 +144,15 @@ QVariant NetworkStreamModel::data(const QModelIndex &index, int role) const
|
||||
// Right-align the unseen count
|
||||
return static_cast<int>(Qt::AlignRight | Qt::AlignVCenter);
|
||||
}
|
||||
else if (role == Qt::ForegroundRole)
|
||||
{
|
||||
// Make streams with no unseen items grey (fully caught up)
|
||||
if (stream.unseenCount == 0)
|
||||
{
|
||||
return QBrush(QColor(128, 128, 128));
|
||||
}
|
||||
// Streams with unseen items use default color
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user