1
0
Fork 0

[UI] Minor changes.

This commit is contained in:
Kitteh 2018-10-24 15:50:22 +01:00
parent 8746557219
commit ad2449c134

View file

@ -213,8 +213,12 @@ ApplicationWindow {
nativeSubs.text = player.getProperty("sub-text") nativeSubs.text = player.getProperty("sub-text")
} }
function isAnyMenuOpen() {
return subtitlesMenu.visible || settingsMenu.visible || fileMenuBarItem.opened || playbackMenuBarItem.opened || viewMenuBarItem.opened
}
function hideControls() { function hideControls() {
if ( ! (subtitlesMenu.visible || settingsMenu.visible || fileMenuBarItem.opened) ) { if ( ! isAnyMenuOpen() ) {
player.setOption("sub-margin-y", "22") player.setOption("sub-margin-y", "22")
controlsBar.visible = false controlsBar.visible = false
controlsBackground.visible = false controlsBackground.visible = false
@ -309,25 +313,6 @@ ApplicationWindow {
} }
} }
/*Item {
id: keybinds
anchors.fill: parent
focus: true
Keys.onPressed: {
if (event.key == Qt.Key_K || event.key == Qt.Key_Space) {
player.command(["cycle", "pause"])
} else if (event.key == Qt.Key_J) {
player.command(["seek", "-10"])
} else if (event.key == Qt.Key_L) {
player.command(["seek", "10"])
} else if (event.key == Qt.Key_I) {
player.command(["script-binding", "stats/display-stats-toggle"])
}
updateControls()
}
}*/
MenuBar { MenuBar {
id: menuBar id: menuBar
//width: parent.width //width: parent.width
@ -460,6 +445,14 @@ ApplicationWindow {
} }
shortcut: "F" shortcut: "F"
} }
Action {
text: "Stats For Nerds"
onTriggered: {
player.command(["script-binding", "stats/display-stats-toggle"])
}
shortcut: "I"
}
} }
@ -486,7 +479,6 @@ ApplicationWindow {
opacity: 0.6 opacity: 0.6
} }
Rectangle { Rectangle {
id: subtitlesMenu id: subtitlesMenu
color: "transparent" color: "transparent"