diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-06-26 19:21:31 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-06-26 19:21:31 (GMT) |
commit | de7ee8e38a2dfaab9fde40a7916c8212f5859d68 (patch) | |
tree | c2b8b07ea10b81fb52fef9cbb79f57a52589e657 /Swift/QtUI/ChatList | |
parent | 53f132042a6d470f94a9721a31c86514aba11c4f (diff) | |
download | swift-de7ee8e38a2dfaab9fde40a7916c8212f5859d68.zip swift-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.cpp | 4 |
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(); } |