1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-24 14:42:53 +02:00

* AlignVCenter already takes care of y-axis in paintStandardItem.

This commit is contained in:
Christian Muehlhaeuser
2014-09-01 01:52:00 +02:00
parent 5c8d2aae7a
commit ac3d0eb7f0

View File

@@ -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 ) );
}