Merge branch 'ukuibug' into 'dbus-interface'
fix bug 125703 任务栏显示图标和默认弹出界面不一致 See merge request kylin-desktop/kylin-nm!675
This commit is contained in:
commit
be48c30738
|
@ -508,11 +508,27 @@ void MainWindow::showByWaylandHelper()
|
|||
|
||||
}
|
||||
|
||||
void MainWindow::setCentralWidgetType(IconActiveType iconStatus)
|
||||
{
|
||||
if (iconStatus == WLAN_CONNECTED || iconStatus == WLAN_CONNECTED_LIMITED) {
|
||||
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