Commit 910b0583 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: Extend seekslider to use the old native look

parent 0147fb79
......@@ -55,8 +55,8 @@
#define FADEDURATION 300
#define FADEOUTDELAY 2000
SeekSlider::SeekSlider( Qt::Orientation q, QWidget *_parent )
: QSlider( q, _parent )
SeekSlider::SeekSlider( Qt::Orientation q, QWidget *_parent, bool _static )
: QSlider( q, _parent ), b_classic( _static )
{
isSliding = false;
f_buffering = 1.0;
......@@ -350,7 +350,8 @@ QSize SeekSlider::handleSize() const
void SeekSlider::paintEvent( QPaintEvent *event )
{
Q_UNUSED( event );
if( b_classic )
return QSlider::paintEvent( event );
QStyleOptionSlider option;
initStyleOption( &option );
......
......@@ -50,7 +50,7 @@ class SeekSlider : public QSlider
Q_OBJECT
Q_PROPERTY(qreal handleOpacity READ handleOpacity WRITE setHandleOpacity)
public:
SeekSlider( Qt::Orientation q, QWidget *_parent = 0 );
SeekSlider( Qt::Orientation q, QWidget *_parent = 0, bool _classic = false );
~SeekSlider();
void setChapters( SeekPoints * );
......@@ -82,6 +82,7 @@ private:
TimeTooltip *mTimeTooltip;
float f_buffering;
SeekPoints* chapters;
bool b_classic;
/* Handle's animation */
qreal mHandleOpacity;
......
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