1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

this actually belongs here

This commit is contained in:
krepa098 2014-08-13 22:54:03 +02:00
parent a73464cc56
commit 2cbbfb7037

View File

@ -179,12 +179,13 @@ void ChatForm::addFriendMessage(QString message)
void ChatForm::addMessage(QString author, QString message, QString date)
{
message = SmileyPack::getInstance().smileyfied(message);
addMessage(new QLabel(author), new QLabel(message), new QLabel(date));
}
void ChatForm::addMessage(QLabel* author, QLabel* message, QLabel* date)
{
message->setText(SmileyPack::getInstance().smileyfied(message->text()));
QScrollBar* scroll = chatArea->verticalScrollBar();
lockSliderToBottom = scroll && scroll->value() == scroll->maximum();
author->setAlignment(Qt::AlignTop | Qt::AlignRight);