mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
UI: Change Volume Control volume slider behavior
Replaced default volume slider style with SliderAbsoluteSetStyle.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user