Merging r780:797 from trunk to branches/0.3.
[quassel.git] / src / qtui / chatline-old.cpp
index 0a3cc20..2df6bbb 100644 (file)
@@ -23,6 +23,8 @@
 #include "network.h"
 #include "qtui.h"
 
+#include "qtuisettings.h"
+
 //! Construct a ChatLineOld object from a message.
 /**
  * \param m   The message to be layouted and rendered
@@ -34,6 +36,9 @@ ChatLineOld::ChatLineOld(Message m) {
   selectionMode = None;
   isHighlight = false;
   formatMsg(msg);
+
+  QtUiSettings s("QtUi/Colors");
+  _highlightColor = s.value("highlightColor", QVariant(QColor("lightcoral"))).value<QColor>();
 }
 
 ChatLineOld::~ChatLineOld() {
@@ -317,7 +322,7 @@ void ChatLineOld::draw(QPainter *p, const QPointF &pos) {
   } else {
     if(isHighlight) {
       p->setPen(Qt::NoPen);
-      p->setBrush(QColor("lightcoral") /*pal.brush(QPalette::AlternateBase) */);
+      p->setBrush(_highlightColor /*pal.brush(QPalette::AlternateBase) */);
       p->drawRect(QRectF(pos, QSizeF(tsWidth + QtUi::style()->sepTsSender() + senderWidth + QtUi::style()->sepSenderText() + textWidth, height())));
     }
     if(selectionMode == Partial) {