mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
feat: add show widget to tray icon and show the gui on left click
This commit is contained in:
@@ -41,10 +41,16 @@ def run_gui(app):
|
||||
|
||||
menu = QMenu()
|
||||
|
||||
show = QAction("Show")
|
||||
show.triggered.connect(lambda: widget.show())
|
||||
menu.addAction(show)
|
||||
|
||||
quit = QAction("Quit")
|
||||
quit.triggered.connect(lambda: (closehelper(), force_exit()))
|
||||
menu.addAction(quit)
|
||||
|
||||
tray.activated.connect(lambda reason: widget.show() if reason == QSystemTrayIcon.ActivationReason.Trigger else None)
|
||||
|
||||
tray.setContextMenu(menu)
|
||||
|
||||
# Check OS for window transparency compatibility and apply
|
||||
|
||||
Reference in New Issue
Block a user