mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fixed merge
This commit is contained in:
parent
a159b80801
commit
8db22973e9
|
@ -23,8 +23,9 @@
|
|||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
|
||||
ChatAreaWidget::ChatAreaWidget(QWidget *parent) :
|
||||
QTextBrowser(parent)
|
||||
ChatAreaWidget::ChatAreaWidget(QWidget *parent)
|
||||
: QTextBrowser(parent)
|
||||
, nameWidth(75)
|
||||
{
|
||||
setReadOnly(true);
|
||||
viewport()->setCursor(Qt::ArrowCursor);
|
||||
|
@ -39,7 +40,7 @@ ChatAreaWidget::ChatAreaWidget(QWidget *parent) :
|
|||
QTextTableFormat tableFormat;
|
||||
tableFormat.setCellSpacing(15);
|
||||
tableFormat.setBorderStyle(QTextFrameFormat::BorderStyle_None);
|
||||
tableFormat.setColumnWidthConstraints({QTextLength(QTextLength::VariableLength,0),
|
||||
tableFormat.setColumnWidthConstraints({QTextLength(QTextLength::FixedLength,nameWidth),
|
||||
QTextLength(QTextLength::PercentageLength,100),
|
||||
QTextLength(QTextLength::VariableLength,0)});
|
||||
|
||||
|
@ -50,7 +51,6 @@ ChatAreaWidget::ChatAreaWidget(QWidget *parent) :
|
|||
dateFormat.setAlignment(Qt::AlignLeft);
|
||||
dateFormat.setNonBreakableLines(true);
|
||||
|
||||
|
||||
connect(this, &ChatAreaWidget::anchorClicked, this, &ChatAreaWidget::onAnchorClicked);
|
||||
connect(verticalScrollBar(), SIGNAL(rangeChanged(int,int)), this, SLOT(onSliderRangeChanged()));
|
||||
}
|
||||
|
|
|
@ -173,7 +173,9 @@ void GenericChatForm::addMessage(QString author, QString message, QDateTime date
|
|||
|
||||
if (previousName == author)
|
||||
chatWidget->insertMessage(new MessageAction("", message, date, isMe));
|
||||
else chatWidget->insertMessage(new MessageAction(getElidedName(author) , message, date, isMe));
|
||||
else
|
||||
chatWidget->insertMessage(new MessageAction(getElidedName(author) , message, date, isMe));
|
||||
|
||||
previousName = author;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user