double-clicking tray icon should work on windows as well. also labeled the tray icon with a tooltip.
This commit is contained in:
parent
0f2063b67f
commit
5af4b13611
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue