Commit 652ad4a2 authored by Sylvain Berfini's avatar Sylvain Berfini

Fixed menu items shortcuts

parent 8297e5c3
...@@ -22,7 +22,17 @@ Item { ...@@ -22,7 +22,17 @@ Item {
title: qsTr('options') title: qsTr('options')
MenuItem { MenuItem {
shortcut: 'Ctrl+P' shortcut: Shortcut {
sequence: StandardKey.Preferences
onActivated: {
var window = App.getSettingsWindow()
if (window.visibility === Window.Minimized) {
window.visibility = Window.AutomaticVisibility
} else {
window.setVisible(true)
}
}
}
text: qsTr('settings') text: qsTr('settings')
onTriggered: { onTriggered: {
...@@ -38,7 +48,11 @@ Item { ...@@ -38,7 +48,11 @@ Item {
MenuSeparator {} MenuSeparator {}
MenuItem { MenuItem {
shortcut: StandardKey.Quit shortcut: Shortcut {
sequence: StandardKey.Quit
context: Qt.ApplicationShortcut
onActivated: Qt.quit()
}
text: qsTr('quit') text: qsTr('quit')
onTriggered: Qt.quit() onTriggered: Qt.quit()
...@@ -67,7 +81,13 @@ Item { ...@@ -67,7 +81,13 @@ Item {
title: qsTr('help') title: qsTr('help')
MenuItem { MenuItem {
shortcut: StandardKey.HelpContents shortcut: Shortcut {
sequence: StandardKey.HelpContents
onActivated: {
window.detachVirtualWindow()
window.attachVirtualWindow(Qt.resolvedUrl('About.qml'))
}
}
text: qsTr('about') text: qsTr('about')
onTriggered: { onTriggered: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment