Fix line break issue on timeline with long words

fixes #193
This commit is contained in:
Konstantinos Sideris 2018-05-23 16:33:30 +03:00
parent 03c5f79543
commit 3cf7ab9f04
2 changed files with 47 additions and 8 deletions

View file

@ -18,7 +18,6 @@
#include <QContextMenuEvent>
#include <QFontDatabase>
#include <QMenu>
#include <QTextEdit>
#include <QTimer>
#include "Avatar.h"
@ -426,14 +425,9 @@ TimelineItem::generateBody(const QString &body)
{
QString content("<span>%1</span>");
body_ = new QLabel(this);
body_ = new TextLabel(content.arg(replaceEmoji(body)), this);
body_->setFont(font_);
body_->setWordWrap(true);
body_->setText(content.arg(replaceEmoji(body)));
body_->setMargin(0);
body_->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextBrowserInteraction);
body_->setOpenExternalLinks(true);
}
// The username/timestamp is displayed along with the message body.