summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/ChatList/ChatListDelegate.cpp')
-rw-r--r--Swift/QtUI/ChatList/ChatListDelegate.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/Swift/QtUI/ChatList/ChatListDelegate.cpp b/Swift/QtUI/ChatList/ChatListDelegate.cpp
index 29eb29a..f818e50 100644
--- a/Swift/QtUI/ChatList/ChatListDelegate.cpp
+++ b/Swift/QtUI/ChatList/ChatListDelegate.cpp
@@ -1,11 +1,12 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swift/QtUI/ChatList/ChatListDelegate.h>
+#include <QColor>
#include <QPainter>
#include <QPen>
@@ -18,6 +19,10 @@
namespace Swift {
+namespace {
+ const QColor secondLineColor = QColor(160,160,160);
+}
+
ChatListDelegate::ChatListDelegate(bool compact) : compact_(compact) {
groupDelegate_ = new GroupItemDelegate();
}
@@ -102,7 +107,7 @@ void ChatListDelegate::paintMUC(QPainter* painter, const QStyleOptionViewItem& o
DelegateCommons::drawElidedText(painter, nameRegion, item->data(Qt::DisplayRole).toString());
painter->setFont(common_.detailFont);
- painter->setPen(QPen(QColor(160,160,160)));
+ painter->setPen(QPen(secondLineColor));
QRect detailRegion(textRegion.adjusted(0, nameHeight, 0, 0));
DelegateCommons::drawElidedText(painter, detailRegion, item->data(ChatListMUCItem::DetailTextRole).toString());