summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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();
}