mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -08:00
[Client] Active pill for alts table, dismissed pill for report queue
This commit is contained in:
parent
a1a5aae467
commit
b4acbcc0cf
5 changed files with 35 additions and 11 deletions
|
|
@ -8,8 +8,10 @@
|
|||
* Badge + icon painting for the User Alts table. The match-evidence column
|
||||
* renders as a palette-tinted pill per match type (email / client id / IP), and
|
||||
* an IP shared by more than one other account is dimmed. Warn/ban counts gain
|
||||
* the style's warning/critical icons when nonzero. Selected rows and unknown
|
||||
* content fall back to default painting.
|
||||
* the style's warning/critical icons when nonzero. The active column renders as
|
||||
* a palette-tinted pill (Highlight when active, PlaceholderText when inactive,
|
||||
* from Qt::UserRole). Selected rows and unknown content fall back to default
|
||||
* painting.
|
||||
*/
|
||||
class AltTableDelegate : public QStyledItemDelegate
|
||||
{
|
||||
|
|
@ -19,6 +21,7 @@ public:
|
|||
int warnsColumn,
|
||||
int bansColumn,
|
||||
int sharedColumn,
|
||||
int activeColumn,
|
||||
QObject *parent = nullptr);
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
[[nodiscard]] QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
|
|
@ -28,6 +31,7 @@ private:
|
|||
int warnsColumn;
|
||||
int bansColumn;
|
||||
int sharedColumn;
|
||||
int activeColumn;
|
||||
};
|
||||
|
||||
#endif // ALT_TABLE_DELEGATE_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue