mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix: 点击任务栏蓝牙设置不能正常唤起控制中心
当开启飞行模式后,只禁用(置灰)蓝牙适配器列表一栏,而不是置灰整个蓝牙面板 Log: 修复点击任务栏蓝牙设置不能正常唤起控制中心的问题 Bug: https://pms.uniontech.com/bug-view-171999.html Influence: 任务栏蓝牙面板正常显示/正常使用 Change-Id: Ib1549cf28736ce2dc780b9b0427a7a472dbd4ab8
This commit is contained in:
parent
4abc8ae385
commit
a764b9f3e9
@ -173,6 +173,11 @@ void BluetoothApplet::onAdapterAdded(Adapter *adapter)
|
|||||||
|
|
||||||
m_adapterItems.insert(adapter->id(), adapterItem);
|
m_adapterItems.insert(adapter->id(), adapterItem);
|
||||||
|
|
||||||
|
// 如果开启了飞行模式,置灰蓝牙适配器使能开关
|
||||||
|
foreach (const auto item, m_adapterItems) {
|
||||||
|
item->setEnabled(!m_airPlaneModeInter->enabled());
|
||||||
|
}
|
||||||
|
|
||||||
m_contentLayout->insertWidget(0, adapterItem, Qt::AlignTop | Qt::AlignVCenter);
|
m_contentLayout->insertWidget(0, adapterItem, Qt::AlignTop | Qt::AlignVCenter);
|
||||||
updateBluetoothPowerState();
|
updateBluetoothPowerState();
|
||||||
updateSize();
|
updateSize();
|
||||||
@ -247,7 +252,6 @@ void BluetoothApplet::initUi()
|
|||||||
updateSize();
|
updateSize();
|
||||||
|
|
||||||
setAirplaneModeEnabled(m_airPlaneModeInter->enabled());
|
setAirplaneModeEnabled(m_airPlaneModeInter->enabled());
|
||||||
setDisabled(m_airPlaneModeInter->enabled());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BluetoothApplet::initConnect()
|
void BluetoothApplet::initConnect()
|
||||||
@ -266,7 +270,11 @@ void BluetoothApplet::initConnect()
|
|||||||
});
|
});
|
||||||
connect(DApplicationHelper::instance(), &DApplicationHelper::themeTypeChanged, this, &BluetoothApplet::updateIconTheme);
|
connect(DApplicationHelper::instance(), &DApplicationHelper::themeTypeChanged, this, &BluetoothApplet::updateIconTheme);
|
||||||
connect(m_airPlaneModeInter, &DBusAirplaneMode::EnabledChanged, this, &BluetoothApplet::setAirplaneModeEnabled);
|
connect(m_airPlaneModeInter, &DBusAirplaneMode::EnabledChanged, this, &BluetoothApplet::setAirplaneModeEnabled);
|
||||||
connect(m_airPlaneModeInter, &DBusAirplaneMode::EnabledChanged, this, &BluetoothApplet::setDisabled);
|
connect(m_airPlaneModeInter, &DBusAirplaneMode::EnabledChanged, this, [this](bool enabled) {
|
||||||
|
foreach (const auto item, m_adapterItems) {
|
||||||
|
item->setEnabled(!enabled);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user