diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp index 647869c02..ae053ba32 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.cpp +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.cpp @@ -173,11 +173,11 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci) QString timestamp = "[" + QDateTime::currentDateTime().toString("hh:mm:ss") + "]"; //QString pre = tr("Peer:" ); - QString name = QString::fromStdString(ci->name); - QString line = "" + timestamp + - " " + name + ""; - - extraTxt += line; + QString name = QString::fromStdString(ci->name); + QString line = "" + timestamp + "" + + "" + " " + name + ""; + + extraTxt += line; extraTxt += QString::fromStdWString(ci -> msg); @@ -244,14 +244,16 @@ void PopupChatDialog::showAvatarFrame(bool show) void PopupChatDialog::setColor() { + QColor col = QColorDialog::getColor(Qt::black, this); if (col.isValid()) { - ui.colorButton->setPalette(QPalette(col)); + //ui.colorButton->setPalette(QPalette(col)); + //ui.chattextEdit->setTextCursor(); ui.chattextEdit->setTextColor(QColor(col)); - QTextCharFormat fmt; - fmt.setForeground(col); - mergeFormatOnWordOrSelection(fmt); + //QTextCharFormat fmt; + //fmt.setForeground(col); + //mergeFormatOnWordOrSelection(fmt); colorChanged(col); } } @@ -265,11 +267,11 @@ void PopupChatDialog::colorChanged(const QColor &c) void PopupChatDialog::mergeFormatOnWordOrSelection(const QTextCharFormat &format) { - QTextCursor cursor = ui.chattextEdit->textCursor(); - if (!cursor.hasSelection()) + //QTextCursor cursor = ui.chattextEdit->textCursor(); + /*if (!cursor.hasSelection()) cursor.select(QTextCursor::WordUnderCursor); - cursor.mergeCharFormat(format); - ui.chattextEdit->mergeCurrentCharFormat(format); + cursor.mergeCharFormat(format);*/ + //ui.chattextEdit->mergeCurrentCharFormat(format); } void PopupChatDialog::getFont()