summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/ChatList')
-rw-r--r--Swift/QtUI/ChatList/ChatListDelegate.cpp9
-rw-r--r--Swift/QtUI/ChatList/ChatListMUCItem.cpp6
-rw-r--r--Swift/QtUI/ChatList/ChatListRecentItem.cpp4
-rw-r--r--Swift/QtUI/ChatList/ChatListWhiteboardItem.cpp11
4 files changed, 20 insertions, 10 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());
diff --git a/Swift/QtUI/ChatList/ChatListMUCItem.cpp b/Swift/QtUI/ChatList/ChatListMUCItem.cpp
index 7d072df..e701ddc 100644
--- a/Swift/QtUI/ChatList/ChatListMUCItem.cpp
+++ b/Swift/QtUI/ChatList/ChatListMUCItem.cpp
@@ -6,6 +6,8 @@
#include <Swift/QtUI/ChatList/ChatListMUCItem.h>
+#include <QColor>
+
#include <Swift/QtUI/QtSwiftUtil.h>
namespace Swift {
@@ -21,8 +23,8 @@ QVariant ChatListMUCItem::data(int role) const {
switch (role) {
case Qt::DisplayRole: return P2QSTRING(bookmark_.getName());
case DetailTextRole: return P2QSTRING(bookmark_.getRoom().toString());
- /*case Qt::TextColorRole: return textColor_;
- case Qt::BackgroundColorRole: return backgroundColor_;
+ case Qt::TextColorRole: return QColor(89,89,89);
+ /*case Qt::BackgroundColorRole: return backgroundColor_;
case Qt::ToolTipRole: return isContact() ? toolTipString() : QVariant();
case StatusTextRole: return statusText_;
case AvatarRole: return avatar_;
diff --git a/Swift/QtUI/ChatList/ChatListRecentItem.cpp b/Swift/QtUI/ChatList/ChatListRecentItem.cpp
index 383f312..faac937 100644
--- a/Swift/QtUI/ChatList/ChatListRecentItem.cpp
+++ b/Swift/QtUI/ChatList/ChatListRecentItem.cpp
@@ -24,8 +24,8 @@ QVariant ChatListRecentItem::data(int role) const {
switch (role) {
case Qt::DisplayRole: return chat_.impromptuJIDs.empty() ? P2QSTRING(chat_.chatName) : P2QSTRING(chat_.getImpromptuTitle());
case DetailTextRole: return P2QSTRING(chat_.activity);
- /*case Qt::TextColorRole: return textColor_;
- case Qt::BackgroundColorRole: return backgroundColor_;
+ case Qt::TextColorRole: return QColor(89,89,89);
+ /*case Qt::BackgroundColorRole: return backgroundColor_;
case Qt::ToolTipRole: return isContact() ? toolTipString() : QVariant();
case StatusTextRole: return statusText_;*/
case AvatarRole: return QVariant(P2QSTRING(pathToString(chat_.avatarPath)));
diff --git a/Swift/QtUI/ChatList/ChatListWhiteboardItem.cpp b/Swift/QtUI/ChatList/ChatListWhiteboardItem.cpp
index b6f8951..8a4447e 100644
--- a/Swift/QtUI/ChatList/ChatListWhiteboardItem.cpp
+++ b/Swift/QtUI/ChatList/ChatListWhiteboardItem.cpp
@@ -12,6 +12,8 @@
#include <Swift/QtUI/ChatList/ChatListWhiteboardItem.h>
+#include <QColor>
+
#include <Swiften/Base/Path.h>
#include <Swift/QtUI/QtResourceHelper.h>
@@ -30,10 +32,11 @@ namespace Swift {
switch (role) {
case Qt::DisplayRole: return P2QSTRING(chat_.chatName);
case DetailTextRole: return P2QSTRING(chat_.activity);
- /*case Qt::TextColorRole: return textColor_;
- case Qt::BackgroundColorRole: return backgroundColor_;
- case Qt::ToolTipRole: return isContact() ? toolTipString() : QVariant();
- case StatusTextRole: return statusText_;*/
+ case Qt::TextColorRole: return QColor(89,89,89);
+ /*case Qt::TextColorRole: return textColor_;
+ case Qt::BackgroundColorRole: return backgroundColor_;
+ case Qt::ToolTipRole: return isContact() ? toolTipString() : QVariant();
+ case StatusTextRole: return statusText_;*/
case AvatarRole: return QVariant(P2QSTRING(pathToString(chat_.avatarPath)));
case PresenceIconRole: return getPresenceIcon();
default: return QVariant();