fix: 任务栏声音面板中出现异常的悬浮提示 (#876)

取消声音面板设备悬浮提示

Log: 修复任务栏声音面板中出现异常的悬浮提示的问题
Influence: 任务栏声音面板正常显示

Co-authored-by: dengbo <dengbo@deepin.org>
This commit is contained in:
dengbo 2023-07-05 09:53:48 +08:00 committed by GitHub
parent 42961e5092
commit fb3f888157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,15 +272,11 @@ void SoundDevicesWidget::addPort(const SoundDevicePort *port)
portItem->setTextColorRole(QPalette::BrightText);
portItem->setData(QVariant::fromValue<const SoundDevicePort *>(port), DeviceObjRole);
portItem->setData(AUDIOPORT, ItemTypeRole);
portItem->setToolTip(port->cardName());
static QBrush oldBackGroundStyle = portItem->background();
connect(port, &SoundDevicePort::nameChanged, this, [ = ](const QString &str) {
portItem->setText(str);
});
connect(port, &SoundDevicePort::cardNameChanged, this, [ = ](const QString &str) {
portItem->setToolTip(str);
});
connect(port, &SoundDevicePort::isActiveChanged, this, [ = ](bool isActive) {
portItem->setCheckState(isActive ? Qt::CheckState::Checked : Qt::CheckState::Unchecked);
if (isActive) {