[vlc-commits] Qt: SeekStyle: don't use outer size for inner content (fix #9740)

Francois Cartegnie git at videolan.org
Mon Dec 30 20:35:47 CET 2013


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Dec 30 20:32:36 2013 +0100| [ebf778dc39016a5833ad5cb9da857d072072a6f1] | committer: Francois Cartegnie

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ebf778dc39016a5833ad5cb9da857d072072a6f1
---

 modules/gui/qt4/styles/seekstyle.cpp  |    4 ++--
 modules/gui/qt4/util/input_slider.cpp |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/styles/seekstyle.cpp b/modules/gui/qt4/styles/seekstyle.cpp
index 1bd2b59..c41a78d 100644
--- a/modules/gui/qt4/styles/seekstyle.cpp
+++ b/modules/gui/qt4/styles/seekstyle.cpp
@@ -42,8 +42,8 @@ int SeekStyle::pixelMetric( PixelMetric metric, const QStyleOption *option, cons
 {
     const QStyleOptionSlider *slider;
 
-    if ( metric == PM_SliderLength && ( slider = qstyleoption_cast<const QStyleOptionSlider *>( option ) ) )
-        return slider->rect.height();
+    if ( widget && metric == QStyle::PM_SliderThickness && ( slider = qstyleoption_cast<const QStyleOptionSlider *>( option ) ) )
+        return widget->minimumSize().height();
     else
         return QProxyStyle::pixelMetric( metric, option, widget );
 }
diff --git a/modules/gui/qt4/util/input_slider.cpp b/modules/gui/qt4/util/input_slider.cpp
index 841b644..8a477c5 100644
--- a/modules/gui/qt4/util/input_slider.cpp
+++ b/modules/gui/qt4/util/input_slider.cpp
@@ -112,6 +112,7 @@ SeekSlider::SeekSlider( Qt::Orientation q, QWidget *_parent, bool _static )
     setFocusPolicy( Qt::NoFocus );
 
     /* Use the new/classic style */
+    setMinimumHeight( 18 );
     if( !b_classic )
     {
         alternativeStyle = new SeekStyle;



More information about the vlc-commits mailing list