Commit 770f3c56 authored by Ilkka Ollakka's avatar Ilkka Ollakka

qt4: fix volume-slider tooltip to fit volume regarding fontsize

Should Fix #3672
parent 865a279f
......@@ -324,7 +324,8 @@ void SoundSlider::paintEvent( QPaintEvent *e )
painter.setPen( palette().color( QPalette::Active, QPalette::Mid ) );
QFont font;
painter.setFont( font );
const QRect rect( 0, 0, 34, 15 );
QFontMetrics fm = QFontMetrics( font );
const QRect rect = fm.boundingRect( QString::number( value() ) + '%' );
painter.drawText( rect, Qt::AlignRight | Qt::AlignVCenter,
QString::number( value() ) + '%' );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment