From 97986d8d3e38869a60adbc773cbe21dbc0720030 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 26 Jun 2011 15:20:50 +0200 Subject: [PATCH] * Use QTextOption to v-center HeaderLabel properly. --- src/libtomahawk/widgets/HeaderLabel.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libtomahawk/widgets/HeaderLabel.cpp b/src/libtomahawk/widgets/HeaderLabel.cpp index 19d347d2a..208abed60 100644 --- a/src/libtomahawk/widgets/HeaderLabel.cpp +++ b/src/libtomahawk/widgets/HeaderLabel.cpp @@ -37,7 +37,7 @@ HeaderLabel::HeaderLabel( QWidget* parent ) #endif setFont( f ); - setFixedHeight( sizeHint().height() + 6 ); + setFixedHeight( sizeHint().height() + 8 ); } @@ -79,7 +79,8 @@ HeaderLabel::paintEvent( QPaintEvent* event ) p.drawLine( line ); } - r.adjust( 8, 2, -8, -2 ); + QTextOption to( Qt::AlignVCenter ); + r.adjust( 8, 0, -8, 0 ); p.setPen( Qt::white ); - p.drawText( r, text() ); + p.drawText( r, text(), to ); }