Skip to content
Snippets Groups Projects
Commit e57f5f84 authored by Konstantinos Sideris's avatar Konstantinos Sideris
Browse files

Restrict display name width to 500px

parent 9d763c4d
No related branches found
No related tags found
No related merge requests found
......@@ -344,9 +344,11 @@ TimelineItem::generateBody(const QString &userid, const QString &body)
QFont usernameFont = font_;
usernameFont.setBold(true);
QFontMetrics fm(usernameFont);
userName_ = new QLabel(this);
userName_->setFont(usernameFont);
userName_->setText(sender);
userName_->setText(fm.elidedText(sender, Qt::ElideRight, 500));
if (body.isEmpty())
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment