1
0
Fork 0

[UI] Open Media Changes

This commit is contained in:
Kitteh 2018-10-21 15:42:52 +01:00
parent 67df0fd242
commit 505629d69a

View file

@ -221,55 +221,31 @@ Window {
titleBackground.visible = true titleBackground.visible = true
} }
Dialog {
id: loadDialog
title: "URL / File Path"
FileDialog { FileDialog {
id: fileDialog id: fileDialog
title: "Please choose a file" title: "Please choose a file"
folder: shortcuts.home folder: shortcuts.home
onAccepted: { onAccepted: {
renderer.command(["loadfile", String(fileDialog.fileUrl)]) renderer.command(["loadfile", String(fileDialog.fileUrl)])
loadDialog.close() fileDialog.close()
} }
onRejected: { onRejected: {
fileDialog.close() fileDialog.close()
} }
} }
contentItem: Rectangle {
implicitWidth: 150 Dialog {
implicitHeight: 200 id: loadDialog
anchors.fill: parent title: "URL / File Path"
standardButtons: StandardButton.Cancel | StandardButton.Open
onAccepted: {
renderer.command(["loadfile", pathText.text])
pathText.text = ""
}
TextField { TextField {
id: pathText id: pathText
placeholderText: qsTr("URL / File Path") placeholderText: qsTr("URL / File Path")
} }
Button {
id: fileChooserButton
flat: false
anchors.top: pathText.bottom;
text: "File Chooser"
onClicked: fileDialog.open()
}
Button {
flat: false
id: loadOKButton
anchors.top: fileChooserButton.bottom;
text: "OK"
onClicked: {
renderer.command(["loadfile", pathText.text])
loadDialog.close()
}
}
Button {
flat: false
anchors.top: loadOKButton.bottom;
text: "Cancel"
onClicked: {
loadDialog.close()
}
}
}
} }
MouseArea { MouseArea {
@ -303,7 +279,7 @@ Window {
updateControls() updateControls()
} }
onDoubleClicked: { onDoubleClicked: {
loadDialog.open() fileDialog.open()
} }
Timer { Timer {
id: mouseAreaPlayerTimer id: mouseAreaPlayerTimer
@ -727,8 +703,6 @@ Window {
color: "transparent" color: "transparent"
} }
} }
//}
} }
Item { Item {