From ac3d0eb7f06ed8e4f7074385a32c15cfce8d2857 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Mon, 1 Sep 2014 01:52:00 +0200 Subject: [PATCH] * AlignVCenter already takes care of y-axis in paintStandardItem. --- src/tomahawk/sourcetree/SourceDelegate.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tomahawk/sourcetree/SourceDelegate.cpp b/src/tomahawk/sourcetree/SourceDelegate.cpp index 89b2abc1a..38722d4ff 100644 --- a/src/tomahawk/sourcetree/SourceDelegate.cpp +++ b/src/tomahawk/sourcetree/SourceDelegate.cpp @@ -128,9 +128,7 @@ SourceDelegate::paintStandardItem( QPainter* painter, const QStyleOptionViewItem if ( !count.isEmpty() ) { figWidth = QFontMetrics( painter->font() ).width( count ); - QRect figRect = option.rect.adjusted( option.rect.width() - figWidth - 16, 0, -14, -option.rect.height() + option.fontMetrics.height() * 1.1 ); - int hd = ( option.rect.height() - figRect.height() ) / 2; - figRect.adjust( 0, hd, 0, hd ); + const QRect figRect = option.rect.adjusted( option.rect.width() - figWidth - 16, 0, -14, 0 ); painter->drawText( figRect, count, QTextOption( Qt::AlignVCenter | Qt::AlignRight ) ); }