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/EventViewer
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/EventViewer')
-rw-r--r--Swift/QtUI/EventViewer/TwoLineDelegate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swift/QtUI/EventViewer/TwoLineDelegate.cpp b/Swift/QtUI/EventViewer/TwoLineDelegate.cpp
index 2437a44..08491b9 100644
--- a/Swift/QtUI/EventViewer/TwoLineDelegate.cpp
+++ b/Swift/QtUI/EventViewer/TwoLineDelegate.cpp
@@ -48,13 +48,13 @@ void TwoLineDelegate::paint(QPainter* painter, const QStyleOptionViewItem& optio
int nameHeight = nameMetrics.height() + common_.verticalMargin;
QRect nameRegion(textRegion.adjusted(0, common_.verticalMargin, 0, 0));
- painter->drawText(nameRegion, Qt::AlignTop, event->data(firstRole_).toString());
+ DelegateCommons::drawElidedText(painter, nameRegion, event->data(firstRole_).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, event->data(secondRole_).toString());
+ DelegateCommons::drawElidedText(painter, detailRegion, event->data(secondRole_).toString());
painter->restore();
}