[UI] Added video and aspect ratio keybinds.
This commit is contained in:
parent
2db4c9246e
commit
5c8b05ff82
|
@ -215,7 +215,7 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
function isAnyMenuOpen() {
|
function isAnyMenuOpen() {
|
||||||
return subtitlesMenu.visible || settingsMenu.visible || fileMenuBarItem.opened || playbackMenuBarItem.opened || viewMenuBarItem.opened
|
return subtitlesMenu.visible || settingsMenu.visible || fileMenuBarItem.opened || playbackMenuBarItem.opened || viewMenuBarItem.opened || tracksMenuBarItem.opened
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideControls() {
|
function hideControls() {
|
||||||
|
@ -333,7 +333,8 @@ ApplicationWindow {
|
||||||
property string cycleSub: "S"
|
property string cycleSub: "S"
|
||||||
property string cycleSubBackwards: "Shift+S"
|
property string cycleSubBackwards: "Shift+S"
|
||||||
property string cycleAudio: "A"
|
property string cycleAudio: "A"
|
||||||
|
property string cycleVideo: "V"
|
||||||
|
property string cycleVideoAspect: "Shift+A"
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuBar {
|
MenuBar {
|
||||||
|
@ -469,6 +470,35 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
shortcut: keybinds.backwardFrame
|
shortcut: keybinds.backwardFrame
|
||||||
}
|
}
|
||||||
|
Action {
|
||||||
|
text: "Switch Aspect Ratio"
|
||||||
|
onTriggered: {
|
||||||
|
player.command(["cycle-values", "video-aspect", "16:9", "4:3", "2.35:1", "-1"])
|
||||||
|
}
|
||||||
|
shortcut: keybinds.cycleVideoAspect
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Menu {
|
||||||
|
id: tracksMenuBarItem
|
||||||
|
title: "Tracks"
|
||||||
|
width: 100
|
||||||
|
background: Rectangle {
|
||||||
|
implicitWidth: parent.width
|
||||||
|
implicitHeight: 10
|
||||||
|
color: "black"
|
||||||
|
opacity: 0.6
|
||||||
|
}
|
||||||
|
delegate: CustomMenuItem { width: 100 }
|
||||||
|
Action {
|
||||||
|
text: "Track Menu"
|
||||||
|
onTriggered: {
|
||||||
|
tracksMenuUpdate()
|
||||||
|
subtitlesMenu.visible = !subtitlesMenu.visible
|
||||||
|
subtitlesMenuBackground.visible = !subtitlesMenuBackground.visible
|
||||||
|
}
|
||||||
|
shortcut: keybinds.tracks
|
||||||
|
}
|
||||||
Action {
|
Action {
|
||||||
text: "Cycle Subs"
|
text: "Cycle Subs"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
@ -490,6 +520,13 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
shortcut: keybinds.cycleAudio
|
shortcut: keybinds.cycleAudio
|
||||||
}
|
}
|
||||||
|
Action {
|
||||||
|
text: "Cycle Video"
|
||||||
|
onTriggered: {
|
||||||
|
player.command(["cycle", "video"])
|
||||||
|
}
|
||||||
|
shortcut: keybinds.cycleVideo
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu {
|
Menu {
|
||||||
|
@ -504,16 +541,6 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
delegate: CustomMenuItem {}
|
delegate: CustomMenuItem {}
|
||||||
|
|
||||||
Action {
|
|
||||||
text: "Tracks"
|
|
||||||
onTriggered: {
|
|
||||||
tracksMenuUpdate()
|
|
||||||
subtitlesMenu.visible = !subtitlesMenu.visible
|
|
||||||
subtitlesMenuBackground.visible = !subtitlesMenuBackground.visible
|
|
||||||
}
|
|
||||||
shortcut: keybinds.tracks
|
|
||||||
}
|
|
||||||
|
|
||||||
Action {
|
Action {
|
||||||
text: "Fullscreen"
|
text: "Fullscreen"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
|
Loading…
Reference in a new issue