1
0
Fork 0

[UI] Shuffled some items around.

This commit is contained in:
Kitteh 2018-10-28 12:19:24 +00:00
parent c53c1af307
commit 8d4d09ba79
5 changed files with 74 additions and 35 deletions

View file

@ -4,5 +4,6 @@
"fstream": "cpp", "fstream": "cpp",
"typeinfo": "cpp", "typeinfo": "cpp",
"qprocess": "cpp" "qprocess": "cpp"
} },
"editor.fontFamily": "'Lato', 'Source Code Pro'"
} }

Binary file not shown.

Binary file not shown.

View file

@ -210,8 +210,9 @@ ApplicationWindow {
function isAnyMenuOpen() { function isAnyMenuOpen() {
return subtitlesMenu.visible || settingsMenu.visible return subtitlesMenu.visible || settingsMenu.visible
|| fileMenuBarItem.opened || playbackMenuBarItem.opened || fileMenuBarItem.opened || playbackMenuBarItem.opened
|| viewMenuBarItem.opened || tracksMenuBarItem.opened || viewMenuBarItem.opened || audioMenuBarItem.opened
|| screenshotSaveDialog.visible || screenshotSaveDialog.visible || videoMenuBarItem.opened
|| subtitleMenuBarItem.opened
} }
function hideControls(force) { function hideControls(force) {
@ -371,6 +372,8 @@ ApplicationWindow {
property string increaseSpeedBy10Percent: "]" property string increaseSpeedBy10Percent: "]"
property string halveSpeed: "{" property string halveSpeed: "{"
property string doubleSpeed: "}" property string doubleSpeed: "}"
property string increaseVolume: "*"
property string decreaseVolume: "/"
} }
MenuBar { MenuBar {
@ -552,19 +555,11 @@ 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 { Menu {
id: tracksMenuBarItem id: audioMenuBarItem
title: "Tracks" title: "Audio"
width: 140 width: 140
background: Rectangle { background: Rectangle {
implicitWidth: parent.width implicitWidth: parent.width
@ -576,13 +571,61 @@ ApplicationWindow {
width: parent.width width: parent.width
} }
Action { Action {
text: "Track Menu" text: "Cycle Audio"
onTriggered: { onTriggered: {
tracksMenuUpdate() player.command(["cycle", "audio"])
subtitlesMenu.visible = !subtitlesMenu.visible
subtitlesMenuBackground.visible = !subtitlesMenuBackground.visible
} }
shortcut: keybinds.tracks shortcut: keybinds.cycleAudio
}
Action {
text: "Increase Volume"
onTriggered: {
player.command(["add", "volume", "2"])
}
shortcut: keybinds.cycleAudio
}
Action {
text: "Decrease Volume"
onTriggered: {
player.command(["add", "volume", "-2"])
}
shortcut: keybinds.cycleAudio
}
}
Menu {
id: videoMenuBarItem
title: "Video"
width: 140
background: Rectangle {
implicitWidth: parent.width
implicitHeight: 10
color: "black"
opacity: 0.6
}
delegate: CustomMenuItem {
width: parent.width
}
Action {
text: "Cycle Video"
onTriggered: {
player.command(["cycle", "video"])
}
shortcut: keybinds.cycleVideo
}
}
Menu {
id: subsMenuBarItem
title: "Subtitles"
width: 140
background: Rectangle {
implicitWidth: parent.width
implicitHeight: 10
color: "black"
opacity: 0.6
}
delegate: CustomMenuItem {
width: parent.width
} }
Action { Action {
text: "Cycle Subs" text: "Cycle Subs"
@ -598,20 +641,6 @@ ApplicationWindow {
} }
shortcut: keybinds.cycleSubBackwards shortcut: keybinds.cycleSubBackwards
} }
Action {
text: "Cycle Audio"
onTriggered: {
player.command(["cycle", "audio"])
}
shortcut: keybinds.cycleAudio
}
Action {
text: "Cycle Video"
onTriggered: {
player.command(["cycle", "video"])
}
shortcut: keybinds.cycleVideo
}
} }
Menu { Menu {
@ -635,6 +664,15 @@ ApplicationWindow {
} }
shortcut: keybinds.fullscreen shortcut: keybinds.fullscreen
} }
Action {
text: "Track Menu"
onTriggered: {
tracksMenuUpdate()
subtitlesMenu.visible = !subtitlesMenu.visible
subtitlesMenuBackground.visible = !subtitlesMenuBackground.visible
}
shortcut: keybinds.tracks
}
Action { Action {
text: "Stats For Nerds" text: "Stats For Nerds"
@ -897,7 +935,7 @@ ApplicationWindow {
} }
function setCachedDuration(val) { function setCachedDuration(val) {
cachedLength.width = (progressBar.width / progressBar.to) * val cachedLength.width = ((progressBar.width / progressBar.to) * val) - progressLength.width
} }
Rectangle { Rectangle {
@ -1014,7 +1052,7 @@ ApplicationWindow {
id: cachedLength id: cachedLength
z: 10 z: 10
anchors.left: progressLength.right anchors.left: progressLength.right
anchors.leftMargin: progressBar.handle.width / 2 anchors.leftMargin: progressBar.handle.width -2
//anchors.left: progressBar.handle.horizontalCenter //anchors.left: progressBar.handle.horizontalCenter
anchors.bottom: progressBar.background.bottom anchors.bottom: progressBar.background.bottom
anchors.top: progressBar.background.top anchors.top: progressBar.background.top

Binary file not shown.