mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix: 修复控制中心禁用所有声音输出设备后,通过任务栏点击音量的开/关,声音变为输出状态的bug
问题:全部声卡禁用后,任务栏取消静音的情况下,可以听见声音输出, 修复方法:在声卡全部禁用后,置灰静音按钮和右键菜单静音选项,其他情况逻辑不变. Bug: https://pms.uniontech.com/zentao/bug-view-86853.html Log: 优化任务栏声音插件 Influence: 华为云音量调节 Change-Id: Ifee21868f64f26165d077016b9cb4f16f2dced85 (cherry picked from commit 9f84ddb8ddbc1e6b5e79abcf91afc1fea2ac2687)
This commit is contained in:
parent
531075d5b1
commit
2396cd2b31
@ -650,6 +650,7 @@ bool SoundApplet::eventFilter(QObject *watcher, QEvent *event)
|
||||
if (watcher == m_volumeIconMin && event->type() == QEvent::MouseButtonRelease) {
|
||||
m_defSinkInter->SetMuteQueued(!m_defSinkInter->mute());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -88,14 +88,12 @@ const QString SoundItem::contextMenu()
|
||||
|
||||
QMap<QString, QVariant> open;
|
||||
open["itemId"] = MUTE;
|
||||
|
||||
// 如果没有可用输出设备,直接显示静音菜单不可用
|
||||
if (!m_applet->existActiveOutputDevice()) {
|
||||
if (m_sinkInter->mute()) {
|
||||
open["itemText"] = tr("Unmute");
|
||||
open["isActive"] = false;
|
||||
} else if (m_sinkInter->mute()) {
|
||||
open["itemText"] = tr("Unmute");
|
||||
open["isActive"] = true;
|
||||
if (!m_applet->existActiveOutputDevice())
|
||||
open["isActive"] = false;
|
||||
else
|
||||
open["isActive"] = true;
|
||||
} else {
|
||||
open["itemText"] = tr("Mute");
|
||||
open["isActive"] = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user