diff --git a/src/sourcetree/sourcedelegate.cpp b/src/sourcetree/sourcedelegate.cpp index 4ecdd9e96..c2ef76c31 100644 --- a/src/sourcetree/sourcedelegate.cpp +++ b/src/sourcetree/sourcedelegate.cpp @@ -242,9 +242,11 @@ SourceDelegate::paintCollection( QPainter* painter, const QStyleOptionViewItem& } } - text = painter->fontMetrics().elidedText( desc, Qt::ElideRight, textRect.width() ); + textRect.adjust( 0, 0, 0, 2 ); + text = painter->fontMetrics().elidedText( desc, Qt::ElideRight, textRect.width() - 4 ); QTextOption to( Qt::AlignVCenter ); - painter->drawText( textRect.adjusted( 0, 0, 0, 2 ), text, to ); + to.setWrapMode( QTextOption::NoWrap ); + painter->drawText( textRect, text, to ); if ( status ) {