Skip to content

Commit

Permalink
try fixing systray disparition
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Leclerc <[email protected]>
  • Loading branch information
sylvlecl committed Sep 30, 2024
1 parent f53e676 commit cb7b55b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions antarest/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ def create_systray_app() -> QApplication:
# Adding an icon
icon = QIcon(str(RESOURCE_PATH / "webapp" / "logo16.png"))
# Adding item on the menu bar
tray = QSystemTrayIcon()
tray.setIcon(icon)
tray = QSystemTrayIcon(icon, app)
tray.setVisible(True)

# Creating the options
menu = QMenu()
open_app_action = QAction("Open application")
Expand All @@ -79,6 +79,7 @@ def create_systray_app() -> QApplication:
tray.setContextMenu(menu)
app.processEvents()
tray.setToolTip("AntaresWebServer")

return app


Expand Down Expand Up @@ -118,7 +119,7 @@ def notification_popup(message: str) -> None:
else:
from plyer import notification # type: ignore

notification.notification_popup(
notification.notify(
title="AntaresWebServer",
message=message,
app_name="AntaresWebServer",
Expand Down

0 comments on commit cb7b55b

Please sign in to comment.