chore: vary visibility of seen content

This commit is contained in:
talksik
2026-01-30 11:56:11 -08:00
parent 42361527fe
commit c90bb6144d
2 changed files with 23 additions and 0 deletions
+11
View File
@@ -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
}
}
}
}
+12
View File
@@ -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