summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-06-26 19:21:31 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-06-26 19:21:31 (GMT)
commitde7ee8e38a2dfaab9fde40a7916c8212f5859d68 (patch)
treec2b8b07ea10b81fb52fef9cbb79f57a52589e657 /Swift/QtUI/ChatList
parent53f132042a6d470f94a9721a31c86514aba11c4f (diff)
downloadswift-contrib-de7ee8e38a2dfaab9fde40a7916c8212f5859d68.zip
swift-contrib-de7ee8e38a2dfaab9fde40a7916c8212f5859d68.tar.bz2
Elide text in the various roster views.
Resolves: #426
Diffstat (limited to 'Swift/QtUI/ChatList')
-rw-r--r--Swift/QtUI/ChatList/ChatListDelegate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swift/QtUI/ChatList/ChatListDelegate.cpp b/Swift/QtUI/ChatList/ChatListDelegate.cpp
index ac05b07..274a10a 100644
--- a/Swift/QtUI/ChatList/ChatListDelegate.cpp
+++ b/Swift/QtUI/ChatList/ChatListDelegate.cpp
@@ -72,13 +72,13 @@ void ChatListDelegate::paintMUC(QPainter* painter, const QStyleOptionViewItem& o
int nameHeight = nameMetrics.height() + common_.verticalMargin;
QRect nameRegion(textRegion.adjusted(0, common_.verticalMargin, 0, 0));
- painter->drawText(nameRegion, Qt::AlignTop, item->data(Qt::DisplayRole).toString());
+ DelegateCommons::drawElidedText(painter, nameRegion, item->data(Qt::DisplayRole).toString());
painter->setFont(common_.detailFont);
painter->setPen(QPen(QColor(160,160,160)));
QRect detailRegion(textRegion.adjusted(0, nameHeight, 0, 0));
- painter->drawText(detailRegion, Qt::AlignTop, item->data(DetailTextRole).toString());
+ DelegateCommons::drawElidedText(painter, detailRegion, item->data(DetailTextRole).toString());
painter->restore();
}