fix bug 125703

This commit is contained in:
zhangyuanyuan1 2022-07-26 10:48:32 +08:00
parent d593223fe7
commit dd72c3c9f2
2 changed files with 17 additions and 0 deletions

View File

@ -508,11 +508,27 @@ void MainWindow::showByWaylandHelper()
}
void MainWindow::setCentralWidgetType(IconActiveType iconStatus)
{
if (iconStatus == WLAN_CONNECTED) {
m_centralWidget->setCurrentIndex(WLAN_PAGE_INDEX);
} else if (iconStatus == ACTIVATING) {
if (m_wlanWidget->checkWlanStatus(NetworkManager::ActiveConnection::State::Activating)) {
m_centralWidget->setCurrentIndex(WLAN_PAGE_INDEX);
} else {
m_centralWidget->setCurrentIndex(LAN_PAGE_INDEX);
}
} else {
m_centralWidget->setCurrentIndex(LAN_PAGE_INDEX);
}
}
/**
* @brief MainWindow::onTrayIconActivated
*/
void MainWindow::onTrayIconActivated(QSystemTrayIcon::ActivationReason reason)
{
setCentralWidgetType(iconStatus);
if (reason == QSystemTrayIcon::ActivationReason::Context) {
m_trayIconMenu->popup(QCursor::pos());
} else {

View File

@ -155,6 +155,7 @@ private:
void resetWindowTheme();
void showControlCenter();
void showByWaylandHelper();
void setCentralWidgetType(IconActiveType iconStatus);
double m_transparency=1.0; //透明度
QGSettings * m_transGsettings; //透明度配置文件
int currentIconIndex=0;