Commit ebf778dc authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: SeekStyle: don't use outer size for inner content (fix #9740)

parent 673d45d0
...@@ -42,8 +42,8 @@ int SeekStyle::pixelMetric( PixelMetric metric, const QStyleOption *option, cons ...@@ -42,8 +42,8 @@ int SeekStyle::pixelMetric( PixelMetric metric, const QStyleOption *option, cons
{ {
const QStyleOptionSlider *slider; const QStyleOptionSlider *slider;
if ( metric == PM_SliderLength && ( slider = qstyleoption_cast<const QStyleOptionSlider *>( option ) ) ) if ( widget && metric == QStyle::PM_SliderThickness && ( slider = qstyleoption_cast<const QStyleOptionSlider *>( option ) ) )
return slider->rect.height(); return widget->minimumSize().height();
else else
return QProxyStyle::pixelMetric( metric, option, widget ); return QProxyStyle::pixelMetric( metric, option, widget );
} }
......
...@@ -112,6 +112,7 @@ SeekSlider::SeekSlider( Qt::Orientation q, QWidget *_parent, bool _static ) ...@@ -112,6 +112,7 @@ SeekSlider::SeekSlider( Qt::Orientation q, QWidget *_parent, bool _static )
setFocusPolicy( Qt::NoFocus ); setFocusPolicy( Qt::NoFocus );
/* Use the new/classic style */ /* Use the new/classic style */
setMinimumHeight( 18 );
if( !b_classic ) if( !b_classic )
{ {
alternativeStyle = new SeekStyle; alternativeStyle = new SeekStyle;
......
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