Commit 6019918a authored by Yang Wang's avatar Yang Wang Committed by Andreas Traczyk

system tray: fix icon behavior

Change-Id: I4b093272431701a79c9ee9bbcf745fd50e4202e3
Gitlab: #494
parent 130a7a46
...@@ -85,7 +85,6 @@ MainWindow::MainWindow(QWidget* parent) ...@@ -85,7 +85,6 @@ MainWindow::MainWindow(QWidget* parent)
[this]() { [this]() {
if (auto currentWidget = dynamic_cast<NavWidget*>(ui->navStack->currentWidget())) { if (auto currentWidget = dynamic_cast<NavWidget*>(ui->navStack->currentWidget())) {
emit currentWidget->NavigationRequested(ScreenEnum::SetttingsScreen); emit currentWidget->NavigationRequested(ScreenEnum::SetttingsScreen);
setWindowState(Qt::WindowActive);
showWindow(); showWindow();
} }
}); });
...@@ -233,7 +232,7 @@ bool MainWindow::nativeEvent(const QByteArray& eventType, void* message, long* r ...@@ -233,7 +232,7 @@ bool MainWindow::nativeEvent(const QByteArray& eventType, void* message, long* r
void MainWindow::trayActivated(QSystemTrayIcon::ActivationReason reason) void MainWindow::trayActivated(QSystemTrayIcon::ActivationReason reason)
{ {
if (reason != QSystemTrayIcon::ActivationReason::Context) if (reason != QSystemTrayIcon::ActivationReason::Context)
this->show(); showWindow();
} }
void MainWindow::showWindow() void MainWindow::showWindow()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment