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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#include "particlelistmodel.h"
|
||||
#include <QApplication>
|
||||
#include <QBrush>
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QStyle>
|
||||
|
||||
ParticleListModel::ParticleListModel(Data *data, QObject *parent)
|
||||
@@ -53,6 +56,15 @@ QVariant ParticleListModel::data(const QModelIndex &index, int role) const
|
||||
}
|
||||
return display;
|
||||
}
|
||||
else if (role == Qt::ForegroundRole)
|
||||
{
|
||||
// Make seen particles subtle grey, unseen stay default color
|
||||
if (particle.seen)
|
||||
{
|
||||
return QBrush(QColor(128, 128, 128)); // Medium grey for seen items
|
||||
}
|
||||
// Unseen items use default foreground color
|
||||
}
|
||||
// else if (role == Qt::DecorationRole)
|
||||
// {
|
||||
// // Return icon based on type
|
||||
|
||||
Reference in New Issue
Block a user