mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:17:35 +00:00
AudioApplet: Update the volume slider on update from audio server
This commit is contained in:
parent
3c8493c667
commit
c1458e8061
1 changed files with 2 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||||
* Copyright (c) 2021, kleines Filmröllchen <malu.bertsch@gmail.com>
|
* Copyright (c) 2021, kleines Filmröllchen <malu.bertsch@gmail.com>
|
||||||
|
* Copyright (c) 2021, David Isaksson <davidisaksson93@gmail.com>
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -40,6 +41,7 @@ public:
|
||||||
|
|
||||||
m_audio_client->on_main_mix_volume_change = [this](double volume) {
|
m_audio_client->on_main_mix_volume_change = [this](double volume) {
|
||||||
m_audio_volume = static_cast<int>(volume * 100);
|
m_audio_volume = static_cast<int>(volume * 100);
|
||||||
|
m_slider->set_value(m_slider->max() - m_audio_volume, GUI::CallOnChange::No);
|
||||||
if (!m_audio_muted)
|
if (!m_audio_muted)
|
||||||
update();
|
update();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue