Tray fix
This commit is contained in:
parent
9dee7bb7e7
commit
3a49d5fdc4
5 changed files with 42 additions and 119 deletions
|
@ -126,7 +126,7 @@ PageBase {
|
|||
}
|
||||
ImageButtonType {
|
||||
id: pushButtonSetting
|
||||
x: parent.width - 60
|
||||
x: parent.width - 70
|
||||
y: 15
|
||||
width: 30
|
||||
height: 30
|
||||
|
|
|
@ -239,6 +239,11 @@ Window {
|
|||
function onHide() {
|
||||
root.hide()
|
||||
}
|
||||
function onRaise() {
|
||||
root.show()
|
||||
root.raise()
|
||||
root.requestActivate()
|
||||
}
|
||||
}
|
||||
|
||||
MessageDialog {
|
||||
|
@ -253,62 +258,6 @@ Window {
|
|||
}
|
||||
visible: false
|
||||
}
|
||||
SystemTrayIcon {
|
||||
visible: true
|
||||
icon.source: UiLogic.trayIconUrl
|
||||
onActivated: {
|
||||
if (Qt.platform.os == "osx" ||
|
||||
Qt.platform.os == "linux") {
|
||||
if (reason === SystemTrayIcon.DoubleClick ||
|
||||
reason === SystemTrayIcon.Trigger) {
|
||||
root.show()
|
||||
root.raise()
|
||||
root.requestActivate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
menu: Menu {
|
||||
MenuItem {
|
||||
iconSource: "qrc:/images/tray/application.png"
|
||||
text: qsTr("Show") + " " + "AmneziaVPN"
|
||||
onTriggered: {
|
||||
root.show()
|
||||
root.raise()
|
||||
}
|
||||
}
|
||||
MenuSeparator { }
|
||||
MenuItem {
|
||||
text: qsTr("Connect")
|
||||
enabled: UiLogic.trayActionConnectEnabled
|
||||
onTriggered: {
|
||||
UiLogic.onConnect()
|
||||
}
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("Disconnect")
|
||||
enabled: UiLogic.trayActionDisconnectEnabled
|
||||
onTriggered: {
|
||||
UiLogic.onDisconnect()
|
||||
}
|
||||
}
|
||||
MenuSeparator { }
|
||||
MenuItem {
|
||||
iconSource: "qrc:/images/tray/link.png"
|
||||
text: qsTr("Visit Website")
|
||||
onTriggered: {
|
||||
Qt.openUrlExternally("https://amnezia.org")
|
||||
}
|
||||
}
|
||||
MenuItem {
|
||||
iconSource: "qrc:/images/tray/cancel.png"
|
||||
text: qsTr("Quit") + " " + "AmneziaVPN"
|
||||
onTriggered: {
|
||||
closePrompt.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
MessageDialog {
|
||||
id: publicKeyWarning
|
||||
title: "AmneziaVPN"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue