Improve system tray icon click behavior
- Middle click now closes Mirage - A normal click now toggle window visibility
This commit is contained in:
parent
a543c79c02
commit
c41ed5d77d
|
@ -30,10 +30,12 @@ SystemTrayIcon {
|
|||
tooltip: Qt.application.displayName
|
||||
icon.source: `../../icons/${iconPack}/tray-icon.png`
|
||||
|
||||
onActivated:
|
||||
if (reason !== SystemTrayIcon.Context)
|
||||
window.drawAttention()
|
||||
|
||||
onActivated: {
|
||||
if (reason === SystemTrayIcon.MiddleClick)
|
||||
Qt.quit()
|
||||
else if (reason !== SystemTrayIcon.Context)
|
||||
window.visible ? window.hide() : window.drawAttention()
|
||||
}
|
||||
|
||||
menu: Menu {
|
||||
MenuItem {
|
||||
|
|
Loading…
Reference in New Issue
Block a user