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

Daniel Amm git at videolan.org
Fri Jun 24 18:40:04 CEST 2016


vlc | branch: master | Daniel Amm <da2424 at t-online.de> | Tue Jun 21 23:24:55 2016 +0200| [f4171d24a3a4ad144669d55ed6d670aa98c2e380] | committer: Jean-Baptiste Kempf

Qt: set the seekslider height depending on the DPI

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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;



More information about the vlc-commits mailing list