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

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


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

Qt: adapt the UI for correct spatializer values

Ref #4887

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit d787a15aeef5a79e18fdfd8e16118b7c2df37fbf)

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

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

 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 62560a5..b2689fe 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -1366,23 +1366,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() );
@@ -1396,7 +1380,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