Right align message counts in channel view

This commit is contained in:
Gary Talent 2023-01-25 00:31:00 -06:00
parent a1006ff507
commit 4184c06c51

View File

@ -69,14 +69,21 @@ QVariant ChannelModel::data(const QModelIndex &index, int role) const {
return item->on ? Qt::Checked : Qt::Unchecked; return item->on ? Qt::Checked : Qt::Unchecked;
} }
break; break;
case Qt::TextAlignmentRole:
switch (index.column()) {
case ColChildCount:
case ColCount:
return Qt::AlignRight;
}
break;
case Qt::DisplayRole: case Qt::DisplayRole:
switch (index.column()) { switch (index.column()) {
case ColName: case ColName:
return item->name(); return item->name();
case ColCount: case ColCount:
return item->msgCnt; return QString("%L2").arg(item->msgCnt);
case ColChildCount: case ColChildCount:
return item->msgCnt + item->childrenMsgCnt(); return QString("%L2").arg(item->msgCnt + item->childrenMsgCnt());
} }
} }
return {}; return {};