[vlc-commits] [Git][videolan/vlc][master] qt: show value labels for video effects adjustment sliders

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Thu Jul 2 16:20:47 UTC 2026



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
36ec0a6c by Vipin Karthic at 2026-07-02T18:01:02+02:00
qt: show value labels for video effects adjustment sliders

displays the current effect value next to the hue/brightness/contrast/saturation/gamma sliders in the Adjustments and Effects tab

fixes #29907

- - - - -


3 changed files:

- modules/gui/qt/dialogs/extended/extended_panels.cpp
- modules/gui/qt/dialogs/extended/extended_panels.hpp
- modules/gui/qt/dialogs/extended/video_effects.ui


Changes:

=====================================
modules/gui/qt/dialogs/extended/extended_panels.cpp
=====================================
@@ -148,6 +148,9 @@ static inline void setup_vfilter( qt_intf_t *p_intf, const char* psz_name, QWidg
     setWidgetValue( ui.widget ); \
     connect( ui.widget, signal, this, &ExtVideo::updateFilterOptions );
 
+#define SETUP_VFILTER_VALUE_LABEL( name ) \
+    setupSliderValueLabel( ui.name##Slider, ui.name##ValueLabel );
+
 ExtVideo::ExtVideo( qt_intf_t *_p_intf, QTabWidget *_parent ) :
             QObject( _parent ), p_intf( _p_intf )
 {
@@ -161,6 +164,12 @@ ExtVideo::ExtVideo( qt_intf_t *_p_intf, QTabWidget *_parent ) :
     SETUP_VFILTER_OPTION( gammaSlider, &QSlider::valueChanged )
     SETUP_VFILTER_OPTION( brightnessThresholdCheck, &QtCheckboxChanged )
 
+    SETUP_VFILTER_VALUE_LABEL( hue )
+    SETUP_VFILTER_VALUE_LABEL( brightness )
+    SETUP_VFILTER_VALUE_LABEL( contrast )
+    SETUP_VFILTER_VALUE_LABEL( saturation )
+    SETUP_VFILTER_VALUE_LABEL( gamma )
+
     SETUP_VFILTER_gb( extract )
     SETUP_VFILTER_OPTION( extractComponentText, &QLineEdit::textChanged )
 
@@ -498,6 +507,16 @@ void ExtVideo::setWidgetValue( QObject *widget )
     }
 }
 
+void ExtVideo::setupSliderValueLabel( QSlider *slider, QLabel *label )
+{
+    auto update = [ slider, label ]( int value ) {
+        int interval = slider->tickInterval();
+        label->setText( QString::number( value / ( double )interval, 'f', 1 ) );
+    };
+    connect( slider, &QSlider::valueChanged, label, update );
+    update( slider->value() );
+}
+
 void ExtVideo::setFilterOption( const char *psz_module, const char *psz_option,
         int i_int, double f_float, const char *psz_string )
 {


=====================================
modules/gui/qt/dialogs/extended/extended_panels.hpp
=====================================
@@ -55,6 +55,7 @@ private:
     qt_intf_t *p_intf;
     void initComboBoxItems( QObject* );
     void setWidgetValue( QObject* );
+    void setupSliderValueLabel( QSlider *slider, QLabel *label );
     void clean();
     void setFilterOption( const char *psz_module, const char *psz_option, int,
                           double, const char * );


=====================================
modules/gui/qt/dialogs/extended/video_effects.ui
=====================================
@@ -62,6 +62,13 @@
          </property>
         </widget>
        </item>
+       <item row="0" column="2">
+        <widget class="QLabel" name="hueValueLabel">
+         <property name="text">
+          <string/>
+         </property>
+        </widget> 
+       </item>
        <item row="1" column="0">
         <widget class="QLabel" name="label_3">
          <property name="text">
@@ -88,6 +95,13 @@
          </property>
         </widget>
        </item>
+       <item row="1" column="2">
+        <widget class="QLabel" name="brightnessValueLabel">
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
        <item row="2" column="1">
         <widget class="QCheckBox" name="brightnessThresholdCheck">
          <property name="font">
@@ -126,6 +140,13 @@
          </property>
         </widget>
        </item>
+       <item row="3" column="2">
+        <widget class="QLabel" name="contrastValueLabel">
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
        <item row="4" column="0">
         <widget class="QLabel" name="label_4">
          <property name="text">
@@ -152,6 +173,13 @@
          </property>
         </widget>
        </item>
+       <item row="4" column="2">
+        <widget class="QLabel" name="saturationValueLabel">
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
        <item row="5" column="0">
         <widget class="QLabel" name="label_5">
          <property name="text">
@@ -178,6 +206,13 @@
          </property>
         </widget>
        </item>
+       <item row="5" column="2">
+        <widget class="QLabel" name="gammaValueLabel">
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
       </layout>
      </widget>
     </item>



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/36ec0a6ce99366a1d28af77e3dc0fcdb5658885d

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/36ec0a6ce99366a1d28af77e3dc0fcdb5658885d
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list