double-clicking tray icon should work on windows as well. also labeled the tray icon with a tooltip.

This commit is contained in:
walker0643 2018-01-30 11:54:49 -05:00
parent 0f2063b67f
commit 5af4b13611
1 changed files with 1 additions and 2 deletions

View File

@ -230,6 +230,7 @@ void MainWindow::createTrayIcon()
m_pTrayIcon = new QSystemTrayIcon(this);
m_pTrayIcon->setContextMenu(m_pTrayIconMenu);
m_pTrayIcon->setToolTip("Barrier");
connect(m_pTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
this, SLOT(trayActivated(QSystemTrayIcon::ActivationReason)));
@ -324,7 +325,6 @@ void MainWindow::setIcon(qBarrierState state)
void MainWindow::trayActivated(QSystemTrayIcon::ActivationReason reason)
{
#ifndef Q_OS_WIN
if (reason == QSystemTrayIcon::DoubleClick)
{
if (isVisible())
@ -337,7 +337,6 @@ void MainWindow::trayActivated(QSystemTrayIcon::ActivationReason reason)
activateWindow();
}
}
#endif
}
void MainWindow::logOutput()