[vlc-commits] Qt: adapt the UI for correct spatializer values

Jean-Baptiste Kempf git at videolan.org
Wed Mar 28 01:00:44 CEST 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Mar 27 20:47:30 2012 +0200| [d787a15aeef5a79e18fdfd8e16118b7c2df37fbf] | committer: Jean-Baptiste Kempf

Qt: adapt the UI for correct spatializer values

Ref #4887

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

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

 modules/gui/qt4/components/extended_panels.cpp |   20 +++-----------------
 1 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index b28f9c3..52e55b2 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -1365,23 +1365,7 @@ Spatializer::Spatializer( intf_thread_t *_p_intf, QWidget *_parent )
     for( int i = 0 ; i < NUM_SP_CTRL ; i++ )
     {
         spatCtrl[i] = new QSlider( Qt::Vertical );
-        if( i < 2 )
-        {
-            spatCtrl[i]->setMaximum( 100 );
-            spatCtrl[i]->setValue( 20 );
-        }
-        else if( i < 4 )
-        {
-            spatCtrl[i]->setMaximum( 100 );
-            spatCtrl[i]->setValue( 20 );
-            spatCtrl[i]->setMinimum( -100 );
-        }
-        else
-        {
-            spatCtrl[i]->setMaximum( 40 );
-            spatCtrl[i]->setValue( 10 );
-        }
-
+        spatCtrl[i]->setValue( (int)var_InheritFloat( p_intf, spat_controls[i].psz_name ) * 10. );
         oldControlVars[i] = spatCtrl[i]->value();
 
         CONNECT( spatCtrl[i], valueChanged( int ), this, setInitValues() );
@@ -1395,7 +1379,9 @@ Spatializer::Spatializer( intf_thread_t *_p_intf, QWidget *_parent )
         layout->addWidget( spatCtrl[i],     1, i, Qt::AlignHCenter );
         layout->addWidget( ctrl_readout[i], 2, i, Qt::AlignHCenter );
         layout->addWidget( ctrl_texts[i],   3, i, Qt::AlignHCenter );
+        spatCtrl[i]->setRange( 0, 10 );
     }
+    spatCtrl[0]->setRange( 0, 11 );
 
     BUTTONACT( enableCheck, enable() );
 



More information about the vlc-commits mailing list