[vlc-commits] Qt: SeekStyle: don't use outer size for inner content (fix #9740)
Francois Cartegnie
git at videolan.org
Tue Dec 31 10:08:54 CET 2013
vlc/vlc-2.1 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Dec 30 20:32:36 2013 +0100| [9ac47ba03b2364488712324485dc9a4262a84416] | committer: Jean-Baptiste Kempf
Qt: SeekStyle: don't use outer size for inner content (fix #9740)
(cherry picked from commit ebf778dc39016a5833ad5cb9da857d072072a6f1)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=9ac47ba03b2364488712324485dc9a4262a84416
---
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