mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
fix(dde-dock): wireless icon display error when hotpos is active
This commit is contained in:
parent
d4702c748c
commit
8433ef363c
@ -77,6 +77,7 @@ WirelessList::WirelessList(WirelessDevice *deviceIter, QWidget *parent)
|
||||
m_indicator->setPictureSequence(":/wireless/indicator/resources/wireless/spinner14/Spinner%1.png", QPair<int, int>(1, 91), 2);
|
||||
m_indicator->setFixedSize(QSize(14, 14) * ratio);
|
||||
m_indicator->setVisible(false);
|
||||
isHotposActive = false;
|
||||
|
||||
connect(m_device, &WirelessDevice::apAdded, this, &WirelessList::APAdded);
|
||||
connect(m_device, &WirelessDevice::apRemoved, this, &WirelessList::APRemoved);
|
||||
@ -434,7 +435,7 @@ void WirelessList::onHotspotEnabledChanged(const bool enabled)
|
||||
// Note: the obtained hotspot info is not complete
|
||||
m_activeHotspotAP = enabled ? AccessPoint(m_device->activeHotspotInfo().value("Hotspot").toObject())
|
||||
: AccessPoint();
|
||||
|
||||
isHotposActive = enabled;
|
||||
m_updateAPTimer->start();
|
||||
}
|
||||
|
||||
|
@ -95,6 +95,10 @@ private:
|
||||
DeviceControlWidget *m_controlPanel;
|
||||
|
||||
AccessPointWidget *m_clickedAPW;
|
||||
|
||||
public:
|
||||
bool isHotposActive;
|
||||
|
||||
};
|
||||
|
||||
#endif // WIRELESSAPPLET_H
|
||||
|
@ -203,7 +203,8 @@ const QPixmap WirelessItem::iconPix(const Dock::DisplayMode displayMode, const i
|
||||
|
||||
QString key = QString("wireless-%1-symbolic").arg(type);
|
||||
|
||||
if (state == NetworkDevice::DeviceStatus::Activated && !NetworkPlugin::isConnectivity()) {
|
||||
if ((state == NetworkDevice::DeviceStatus::Activated && !NetworkPlugin::isConnectivity()) ||
|
||||
(m_APList->isHotposActive)) {
|
||||
key = "network-wireless-offline-symbolic";
|
||||
}
|
||||
|
||||
@ -274,6 +275,11 @@ void WirelessItem::refreshTips()
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_APList->isHotposActive){
|
||||
m_wirelessTips->setText(tr("Connected but no Internet access"));
|
||||
return;
|
||||
}
|
||||
|
||||
m_wirelessTips->setText(m_device->statusStringDetail());
|
||||
|
||||
if (NetworkPlugin::isConnectivity()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user