Add keyboard shortcuts for Help and Settings
This commit is contained in:
parent
8fb37ae229
commit
7e414f0af3
1 changed files with 18 additions and 2 deletions
|
|
@ -163,6 +163,8 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
NavigableToolButton {
|
NavigableToolButton {
|
||||||
|
id: helpButton
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
source: "qrc:/res/question_mark.svg"
|
source: "qrc:/res/question_mark.svg"
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
@ -175,7 +177,13 @@ ApplicationWindow {
|
||||||
ToolTip.delay: 1000
|
ToolTip.delay: 1000
|
||||||
ToolTip.timeout: 3000
|
ToolTip.timeout: 3000
|
||||||
ToolTip.visible: hovered
|
ToolTip.visible: hovered
|
||||||
ToolTip.text: "Help"
|
ToolTip.text: "Help" + (helpShortcut.nativeText ? (" ("+helpShortcut.nativeText+")") : "")
|
||||||
|
|
||||||
|
Shortcut {
|
||||||
|
id: helpShortcut
|
||||||
|
sequence: StandardKey.HelpContents
|
||||||
|
onActivated: helpButton.clicked()
|
||||||
|
}
|
||||||
|
|
||||||
// TODO need to make sure browser is brought to foreground.
|
// TODO need to make sure browser is brought to foreground.
|
||||||
onClicked: Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Setup-Guide");
|
onClicked: Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Setup-Guide");
|
||||||
|
|
@ -211,6 +219,8 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
NavigableToolButton {
|
NavigableToolButton {
|
||||||
|
id: settingsButton
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
source: "qrc:/res/settings.svg"
|
source: "qrc:/res/settings.svg"
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
@ -226,10 +236,16 @@ ApplicationWindow {
|
||||||
stackView.currentItem.forceActiveFocus(Qt.TabFocus)
|
stackView.currentItem.forceActiveFocus(Qt.TabFocus)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Shortcut {
|
||||||
|
id: settingsShortcut
|
||||||
|
sequence: StandardKey.Preferences
|
||||||
|
onActivated: settingsButton.clicked()
|
||||||
|
}
|
||||||
|
|
||||||
ToolTip.delay: 1000
|
ToolTip.delay: 1000
|
||||||
ToolTip.timeout: 3000
|
ToolTip.timeout: 3000
|
||||||
ToolTip.visible: hovered
|
ToolTip.visible: hovered
|
||||||
ToolTip.text: "Settings"
|
ToolTip.text: "Settings" + (settingsShortcut.nativeText ? (" ("+settingsShortcut.nativeText+")") : "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue