Browse Source

UI: Change Volume Control volume slider behavior

Replaced default volume slider style with SliderAbsoluteSetStyle.
HomeWorld 10 years ago
parent
commit
8ce623165a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      obs/volume-control.cpp

+ 3 - 0
obs/volume-control.cpp

@@ -1,6 +1,7 @@
 #include "volume-control.hpp"
 #include "qt-wrappers.hpp"
 #include "mute-checkbox.hpp"
+#include "slider-absoluteset-style.hpp"
 #include <util/platform.h>
 #include <QHBoxLayout>
 #include <QVBoxLayout>
@@ -161,6 +162,8 @@ VolControl::VolControl(OBSSource source_)
 	obs_fader_attach_source(obs_fader, source);
 	obs_volmeter_attach_source(obs_volmeter, source);
 
+	slider->setStyle(new SliderAbsoluteSetStyle(slider->style()));
+
 	/* Call volume changed once to init the slider position and label */
 	VolumeChanged();
 }