mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:57:45 +00:00
AudioApplet: Make sure to set the internal volume on slider change
This fixes the issue that the percent label doesn't update.
This commit is contained in:
parent
3f6ccf63fe
commit
bd48abab8b
1 changed files with 2 additions and 1 deletions
|
@ -95,7 +95,8 @@ public:
|
|||
m_slider->set_value(m_slider->max() - m_audio_volume);
|
||||
m_slider->set_knob_size_mode(GUI::Slider::KnobSizeMode::Proportional);
|
||||
m_slider->on_change = [&](int value) {
|
||||
double volume = clamp(static_cast<double>(m_slider->max() - value) / m_slider->max(), 0.0, 1.0);
|
||||
m_audio_volume = m_slider->max() - value;
|
||||
double volume = clamp(static_cast<double>(m_audio_volume) / m_slider->max(), 0.0, 1.0);
|
||||
m_audio_client->set_main_mix_volume(volume);
|
||||
update();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue