Fix:bug#84473

This commit is contained in:
jxj 2021-10-12 17:30:58 +08:00
parent 0e19d97a88
commit 0161531376
6 changed files with 633 additions and 4389 deletions

View File

@ -147,13 +147,13 @@ void MainWindow::initTrayIcon()
m_trayIcon->setToolTip(QString(tr("kylin-nm")));
m_showSettingsAction->setIcon(QIcon::fromTheme("document-page-setup-symbolic", QIcon(":/res/x/setup.png")) );
m_trayIconMenu->addAction(m_showMainwindowAction);
// m_trayIconMenu->addAction(m_showMainwindowAction);
m_trayIconMenu->addAction(m_showSettingsAction);
m_trayIcon->setContextMenu(m_trayIconMenu);
m_trayIcon->setIcon(QIcon::fromTheme("network-wired-signal-excellent-symbolic"));
connect(m_trayIcon, &QSystemTrayIcon::activated, this, &MainWindow::onTrayIconActivated);
connect(m_showMainwindowAction, &QAction::triggered, this, &MainWindow::onShowMainwindowActionTriggled);
// connect(m_showMainwindowAction, &QAction::triggered, this, &MainWindow::onShowMainwindowActionTriggled);
connect(m_showSettingsAction, &QAction::triggered, this, &MainWindow::onShowSettingsActionTriggled);
m_trayIcon->show();
}
@ -357,7 +357,7 @@ void MainWindow::onRefreshTrayIcon()
} else if (m_wlanWidget->m_wlanIsConnected == true && m_lanWidget->m_isLanConnected == false){
m_trayIcon->setIcon(QIcon::fromTheme("network-wireless-signal-excellent-symbolic"));
} else if (m_wlanWidget->m_wlanIsConnected == false && m_lanWidget->m_isLanConnected == false){
m_trayIcon->setIcon(QIcon::fromTheme("network-wired-signal-excellent-symbolic"));
m_trayIcon->setIcon(QIcon::fromTheme("network-wired-disconnected-symbolic"));
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff