[vlc-devel] [PATCH] Qt: set the seekslider height depending on the DPI

Daniel Amm da2424 at t-online.de
Tue Jun 21 23:24:55 CEST 2016


---
 modules/gui/qt/util/input_slider.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/util/input_slider.cpp b/modules/gui/qt/util/input_slider.cpp
index 18fba1d..c4ded6c 100644
--- a/modules/gui/qt/util/input_slider.cpp
+++ b/modules/gui/qt/util/input_slider.cpp
@@ -121,7 +121,8 @@ SeekSlider::SeekSlider( Qt::Orientation q, QWidget *_parent, bool _static )
     setFocusPolicy( Qt::NoFocus );
 
     /* Use the new/classic style */
-    setMinimumHeight( 18 );
+    qreal scalingFactorY = static_cast<qreal>(logicalDpiY()) / DPI_REF_VALUE;
+    setMinimumHeight( 18.0 * scalingFactorY );
     if( !b_classic )
     {
         alternativeStyle = new SeekStyle;
-- 
2.9.0.windows.1



More information about the vlc-devel mailing list