fix(@desktop): missing context menu on SystemTrayIcon
This commit is contained in:
parent
f73fbe3204
commit
b3528bd717
|
@ -47,7 +47,7 @@ proc mainProc() =
|
|||
enableHDPI()
|
||||
initializeOpenGL()
|
||||
|
||||
let app = newQApplication("Status Desktop")
|
||||
let app = newQGuiApplication()
|
||||
let resources =
|
||||
if defined(windows) and defined(production):
|
||||
"/../resources/resources.rcc"
|
||||
|
|
17
ui/main.qml
17
ui/main.qml
|
@ -143,14 +143,20 @@ StatusWindow {
|
|||
return "shared/img/status-logo-dev-circle.svg"
|
||||
}
|
||||
}
|
||||
|
||||
function openStatusWindow() {
|
||||
applicationWindow.show()
|
||||
applicationWindow.raise()
|
||||
applicationWindow.requestActivate()
|
||||
}
|
||||
|
||||
menu: Menu {
|
||||
MenuItem {
|
||||
visible: !applicationWindow.visible
|
||||
//% "Open Status"
|
||||
text: qsTrId("open-status")
|
||||
onTriggered: {
|
||||
applicationWindow.visible = true;
|
||||
applicationWindow.requestActivate();
|
||||
systemTray.openStatusWindow()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,12 +172,9 @@ StatusWindow {
|
|||
}
|
||||
|
||||
onActivated: {
|
||||
if (reason === SystemTrayIcon.Context) {
|
||||
return
|
||||
if (reason !== SystemTrayIcon.Context) {
|
||||
openStatusWindow()
|
||||
}
|
||||
applicationWindow.show()
|
||||
applicationWindow.raise()
|
||||
applicationWindow.requestActivate()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit eaa394d711f757b859030349aeaf41a10e1bad2b
|
||||
Subproject commit 719af38d64d2f61a4e3c858c77a747586fdd58af
|
|
@ -1 +1 @@
|
|||
Subproject commit 65fa68c244fa52037de652520755430ec65c77df
|
||||
Subproject commit 6a5f0ef32ef63b11258866f6208ccfbd43245fd3
|
Loading…
Reference in New Issue