Commit 0b37103c authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: Extend seekslider to use the old native look

(cherry picked from commit 910b0583)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 844056d2
......@@ -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;
......@@ -349,7 +349,8 @@ QSize SeekSlider::handleSize() const
void SeekSlider::paintEvent( QPaintEvent *event )
{
Q_UNUSED( event );
if( b_classic )
return QSlider::paintEvent( event );
QStyleOptionSlider option;
initStyleOption( &option );
......
......@@ -46,7 +46,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 * );
......@@ -78,6 +78,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