mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-25 15:01:11 +02:00
* AlignVCenter already takes care of y-axis in paintStandardItem.
This commit is contained in:
@@ -128,9 +128,7 @@ SourceDelegate::paintStandardItem( QPainter* painter, const QStyleOptionViewItem
|
|||||||
if ( !count.isEmpty() )
|
if ( !count.isEmpty() )
|
||||||
{
|
{
|
||||||
figWidth = QFontMetrics( painter->font() ).width( count );
|
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 );
|
const QRect figRect = option.rect.adjusted( option.rect.width() - figWidth - 16, 0, -14, 0 );
|
||||||
int hd = ( option.rect.height() - figRect.height() ) / 2;
|
|
||||||
figRect.adjust( 0, hd, 0, hd );
|
|
||||||
painter->drawText( figRect, count, QTextOption( Qt::AlignVCenter | Qt::AlignRight ) );
|
painter->drawText( figRect, count, QTextOption( Qt::AlignVCenter | Qt::AlignRight ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user