Commit 5c4a98c1 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - SoundSlider, add a caption of the volume on it after IRC idea.

parent 7e5abc72
...@@ -188,6 +188,13 @@ void SoundSlider::paintEvent(QPaintEvent *e) ...@@ -188,6 +188,13 @@ void SoundSlider::paintEvent(QPaintEvent *e)
const QRectF boundsO( 0, 0, pixOutside.width(), pixOutside.height() ); const QRectF boundsO( 0, 0, pixOutside.width(), pixOutside.height() );
painter.drawPixmap( boundsO, pixOutside, boundsO ); painter.drawPixmap( boundsO, pixOutside, boundsO );
painter.setPen( palette().color( QPalette::Active, QPalette::Mid ) );
QFont font; font.setPixelSize( 9 );
painter.setFont( font );
const QRect rect( 0, 0, 34, 15 );
painter.drawText( rect, Qt::AlignRight | Qt::AlignVCenter,
QString::number( value() ) + '%' );
painter.end(); painter.end();
} }
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