[vlc-commits] Qt: SeekStyle: fix boundaries truncated handle glitch
Francois Cartegnie
git at videolan.org
Sun Mar 16 02:15:40 CET 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Mar 16 02:12:57 2014 +0100| [bafe1e394e2e229be10bef25e3a7f45c013de5f2] | committer: Francois Cartegnie
Qt: SeekStyle: fix boundaries truncated handle glitch
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bafe1e394e2e229be10bef25e3a7f45c013de5f2
---
modules/gui/qt4/styles/seekstyle.cpp | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/styles/seekstyle.cpp b/modules/gui/qt4/styles/seekstyle.cpp
index aa66ec6..9c90d2c 100644
--- a/modules/gui/qt4/styles/seekstyle.cpp
+++ b/modules/gui/qt4/styles/seekstyle.cpp
@@ -48,10 +48,19 @@ int SeekStyle::pixelMetric( PixelMetric metric, const QStyleOption *option, cons
{
const QStyleOptionSlider *slider;
- if ( widget && metric == QStyle::PM_SliderThickness && ( slider = qstyleoption_cast<const QStyleOptionSlider *>( option ) ) )
- return widget->minimumSize().height();
- else
- return QProxyStyle::pixelMetric( metric, option, widget );
+ if ( widget && ( slider = qstyleoption_cast<const QStyleOptionSlider *>( option ) ) )
+ {
+ switch( metric )
+ {
+ case QStyle::PM_SliderThickness:
+ case QStyle::PM_SliderLength:
+ return widget->minimumSize().height();
+ default:
+ break;
+ }
+ }
+
+ return QProxyStyle::pixelMetric( metric, option, widget );
}
void SeekStyle::drawComplexControl( ComplexControl cc, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget ) const
More information about the vlc-commits
mailing list