fix: 蓝牙tips未及时更新

当鼠标放在蓝牙图标上显示tips时,蓝牙状态变化后没有刷新tips

Log: 修复蓝牙tips未及时更新的问题。
Bug: https://pms.uniontech.com/zentao/bug-view-58250.html
Change-Id: I08a07f33d2312412734a09d1115ed211c62eace0
This commit is contained in:
Zhang Qipeng 2020-12-17 16:50:11 +08:00
parent b5d4942c82
commit 5d03f9153d

View File

@ -56,6 +56,7 @@ BluetoothItem::BluetoothItem(QWidget *parent)
connect(m_applet, &BluetoothApplet::deviceStateChanged, [&](const Device::State state) {
m_devState = state;
refreshIcon();
refreshTips();
});
connect(DGuiApplicationHelper::instance(), &DGuiApplicationHelper::themeTypeChanged, this, &BluetoothItem::refreshIcon);
connect(m_applet,&BluetoothApplet::noAdapter,this,&BluetoothItem::noAdapter);
@ -223,4 +224,3 @@ void BluetoothItem::paintEvent(QPaintEvent *event)
const QRectF &rfp = QRectF(m_iconPixmap.rect());
painter.drawPixmap(rf.center() - rfp.center() / m_iconPixmap.devicePixelRatioF(), m_iconPixmap);
}