Add arguments without = support and fullscreen argument.
This commit is contained in:
parent
6f9919869f
commit
b072e60fc8
|
@ -16,6 +16,15 @@ ApplicationWindow {
|
|||
|
||||
property int lastScreenVisibility
|
||||
|
||||
function toggleFullscreen(){
|
||||
if (mainWindow.visibility != Window.FullScreen) {
|
||||
lastScreenVisibility = mainWindow.visibility
|
||||
mainWindow.visibility = Window.FullScreen
|
||||
} else {
|
||||
mainWindow.visibility = lastScreenVisibility
|
||||
}
|
||||
}
|
||||
|
||||
function updatePlayPauseIcon() {
|
||||
var paused = renderer.getProperty("pause")
|
||||
if (paused) {
|
||||
|
@ -132,8 +141,15 @@ ApplicationWindow {
|
|||
argument = argument.substr(2)
|
||||
if (argument.length > 0) {
|
||||
var splitArg = argument.split(/=(.+)/)
|
||||
if (splitArg[0] == "fullscreen") {
|
||||
toggleFullscreen()
|
||||
} else {
|
||||
if (splitArg[1].length == 0) {
|
||||
splitArg[1] = "true"
|
||||
}
|
||||
renderer.setOption(splitArg[0], splitArg[1])
|
||||
}
|
||||
}
|
||||
} else {
|
||||
renderer.command(["loadfile", argument, "append-play"])
|
||||
}
|
||||
|
@ -635,12 +651,7 @@ ApplicationWindow {
|
|||
anchors.right: parent.right
|
||||
display: AbstractButton.IconOnly
|
||||
onClicked: {
|
||||
if (mainWindow.visibility != Window.FullScreen) {
|
||||
lastScreenVisibility = mainWindow.visibility
|
||||
mainWindow.visibility = Window.FullScreen
|
||||
} else {
|
||||
mainWindow.visibility = lastScreenVisibility
|
||||
}
|
||||
toggleFullscreen()
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
|
|
Loading…
Reference in a new issue