X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtopia%2Fchatwidget.cpp;h=b492fd331c040e5b1b83ad87f5d52233f82c7fb5;hp=f7eaed2d3f74def50308def43af1908321576e2e;hb=c0ca17fde48836a5d2e7ea9ceaaabcdd7225d9b8;hpb=902250c45365e890396e0a9833ac56b31f173604 diff --git a/src/qtopia/chatwidget.cpp b/src/qtopia/chatwidget.cpp index f7eaed2d..b492fd33 100644 --- a/src/qtopia/chatwidget.cpp +++ b/src/qtopia/chatwidget.cpp @@ -19,6 +19,7 @@ ***************************************************************************/ #include +#include #include "chatwidget.h" ChatWidget::ChatWidget(QWidget *parent) : QTextEdit(parent) { @@ -58,6 +59,16 @@ void ChatWidget::prependChatLine(ChatLine *line) { moveCursor(QTextCursor::Start); insertHtml(line->text()); setTextCursor(cursor); + QTextCharFormat fmt; + fmt.setForeground(QBrush("#eeff33")); + QFont font("Courier", 8); + font.setFixedPitch(true); qDebug() << font.family(); + fmt.setFont(font); + //fmt.setBackground(QBrush("#112233")); + QTextCursor crsor(document()); + crsor.movePosition(QTextCursor::End, QTextCursor::KeepAnchor); + crsor.select(QTextCursor::Document); + crsor.setCharFormat(fmt); } void ChatWidget::prependChatLines(QList list) {