diff --git a/src/libtomahawk/widgets/DropDownButton.cpp b/src/libtomahawk/widgets/DropDownButton.cpp index 8f315b718..72161c6cb 100644 --- a/src/libtomahawk/widgets/DropDownButton.cpp +++ b/src/libtomahawk/widgets/DropDownButton.cpp @@ -46,6 +46,9 @@ DropDownButton::paintEvent( QPaintEvent* event ) { // QComboBox::paintEvent( event ); QPainter p( this ); + + setupPainter( &p ); + drawPrimitive( &p, contentsRect(), currentText(), true, true ); } @@ -54,8 +57,8 @@ void DropDownButton::drawPrimitive( QPainter* p, const QRect& rect, const QString& text, bool hovering, bool itemsAvailable ) { p->save(); - QFont f = p->font(); - f.setPointSize( 8 ); + + setupPainter( p ); p->setRenderHint( QPainter::TextAntialiasing ); QRect r = rect.adjusted( 2, 2, -2, -2 ); @@ -113,3 +116,13 @@ DropDownButton::mousePressEvent( QMouseEvent* event ) event->accept(); emit clicked(); } + + +void +DropDownButton::setupPainter( QPainter* p ) +{ + QFont f = p->font(); + f.setPointSize( TomahawkUtils::defaultFontSize() - 1 ); + f.setBold( true ); + p->setFont( f ); +} diff --git a/src/libtomahawk/widgets/DropDownButton.h b/src/libtomahawk/widgets/DropDownButton.h index b0d2c6415..e192b67c7 100644 --- a/src/libtomahawk/widgets/DropDownButton.h +++ b/src/libtomahawk/widgets/DropDownButton.h @@ -46,6 +46,7 @@ protected: private slots: private: + static void setupPainter( QPainter* p ); }; #endif // DROPDOWNBUTTON_H