fix bug 125703
This commit is contained in:
parent
d593223fe7
commit
dd72c3c9f2
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue