Commit 3dd58e2c authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Qt4 - SoundSlider. Enable MouseTracking and show a tooltip with the volume...

Qt4 - SoundSlider. Enable MouseTracking and show a tooltip with the volume that it would be if you would click there. Similar to the main slider behaviour.

parent af2a439e
......@@ -121,6 +121,7 @@ SoundSlider::SoundSlider( QWidget *_parent, int _i_step, bool b_hard )
f_step = ( _i_step * 100 ) / AOUT_VOLUME_MAX ;
setRange( SOUNDMIN, b_hard ? (2 * SOUNDMAX) : SOUNDMAX );
setMouseTracking( true );
pixOutside = QPixmap( ":/pixmaps/volume-slider-outside.png" );
......@@ -200,7 +201,11 @@ void SoundSlider::mouseMoveEvent( QMouseEvent *event )
}
}
else
event->ignore();
{
setToolTip( QString("%1 \%" )
.arg( (int)( event->x() - paddingL ) * maximum() / WLENGTH ) );
}
}
void SoundSlider::changeValue( int x )
......
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