projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixing the dock icon in mac os... (fixing doesn't mean prettificatingsvn stat 11)
[quassel.git]
/
src
/
qtui
/
chatline-old.cpp
diff --git
a/src/qtui/chatline-old.cpp
b/src/qtui/chatline-old.cpp
index
0a3cc20
..
497017d
100644
(file)
--- a/
src/qtui/chatline-old.cpp
+++ b/
src/qtui/chatline-old.cpp
@@
-23,21
+23,27
@@
#include "network.h"
#include "qtui.h"
#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
*/
//! Construct a ChatLineOld object from a message.
/**
* \param m The message to be layouted and rendered
*/
-ChatLineOld::ChatLineOld(Message m) {
+QColor ChatLineOld::_highlightColor;
+ChatLineOld::ChatLineOld(const Message &m) {
hght = 0;
hght = 0;
-
msg = m;
selectionMode = None;
isHighlight = false;
formatMsg(msg);
msg = m;
selectionMode = None;
isHighlight = false;
formatMsg(msg);
+
+ if(!_highlightColor.isValid()) {
+ QtUiSettings s("QtUi/Colors");
+ _highlightColor = s.value("highlightColor", QVariant(QColor("lightcoral"))).value<QColor>();
+ }
}
ChatLineOld::~ChatLineOld() {
}
ChatLineOld::~ChatLineOld() {
-
}
void ChatLineOld::formatMsg(Message msg) {
}
void ChatLineOld::formatMsg(Message msg) {
@@
-317,7
+323,7
@@
void ChatLineOld::draw(QPainter *p, const QPointF &pos) {
} else {
if(isHighlight) {
p->setPen(Qt::NoPen);
} 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) {
p->drawRect(QRectF(pos, QSizeF(tsWidth + QtUi::style()->sepTsSender() + senderWidth + QtUi::style()->sepSenderText() + textWidth, height())));
}
if(selectionMode == Partial) {