From fa7a80b215d08d4eb896cf2db5a24994d65a7808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E6=9C=8B=E7=A8=8B?= Date: Tue, 22 Nov 2022 14:28:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E4=B8=AD=E9=9F=B3=E9=87=8F=E8=B0=83=E8=8A=82?= =?UTF-8?q?=E4=B8=8D=E5=93=8D=E5=BA=94=E9=9F=B3=E9=87=8F=E5=A2=9E=E5=BC=BA?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 代码中未处理音量增强的情况 Log: 修复快捷面板中音量调节不响应音量增强设置的问题 Influence: 任务栏-音量插件-音量增强时的交互 Bug: https://pms.uniontech.com/bug-view-171869.html Change-Id: I92e8d5eed9ecba3418edd4d562176b07b0fe1ac6 --- plugins/sound/soundwidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/sound/soundwidget.cpp b/plugins/sound/soundwidget.cpp index 65ddfe9bf..0ebdd900a 100644 --- a/plugins/sound/soundwidget.cpp +++ b/plugins/sound/soundwidget.cpp @@ -93,6 +93,10 @@ void SoundWidget::initConnection() connect(m_defaultSink, &DBusSink::VolumeChanged, m_sliderContainer, &SliderContainer::updateSliderValue); }); + connect(m_dbusAudio, &DBusAudio::MaxUIVolumeChanged, this, [ = ] (double maxValue) { + m_sliderContainer->setRange(0, std::round(maxValue * 100.00)); + }); + connect(m_sliderContainer, &SliderContainer::sliderValueChanged, this, [ this ](int value) { m_defaultSink->SetVolume(value * 0.01, true); });