mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-01 09:36:46 -04:00
Fixed alignment for the attachment counter
This commit is contained in:
parent
6d394c9f55
commit
a5752ec4d3
1 changed files with 10 additions and 0 deletions
|
@ -209,6 +209,8 @@ QVariant RsMessageModel::data(const QModelIndex &index, int role) const
|
|||
std::cerr << "calling data(" << index << ") role=" << role << std::endl;
|
||||
#endif
|
||||
|
||||
int coln = index.column();
|
||||
|
||||
if(!index.isValid())
|
||||
return QVariant();
|
||||
|
||||
|
@ -251,6 +253,14 @@ QVariant RsMessageModel::data(const QModelIndex &index, int role) const
|
|||
|
||||
return QVariant(font);
|
||||
}
|
||||
|
||||
if (role == Qt::TextAlignmentRole)
|
||||
{
|
||||
if((coln == COLUMN_THREAD_ATTACHMENT))
|
||||
return int( Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
else
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MESSAGE_MODEL
|
||||
std::cerr << " [ok]" << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue