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,54 +221,30 @@ Window {
titleBackground.visible = true titleBackground.visible = true
} }
FileDialog {
id: fileDialog
title: "Please choose a file"
folder: shortcuts.home
onAccepted: {
renderer.command(["loadfile", String(fileDialog.fileUrl)])
fileDialog.close()
}
onRejected: {
fileDialog.close()
}
}
Dialog { Dialog {
id: loadDialog id: loadDialog
title: "URL / File Path" title: "URL / File Path"
FileDialog { standardButtons: StandardButton.Cancel | StandardButton.Open
id: fileDialog onAccepted: {
title: "Please choose a file" renderer.command(["loadfile", pathText.text])
folder: shortcuts.home pathText.text = ""
onAccepted: { }
renderer.command(["loadfile", String(fileDialog.fileUrl)]) TextField {
loadDialog.close() id: pathText
} placeholderText: qsTr("URL / File Path")
onRejected: {
fileDialog.close()
}
}
contentItem: Rectangle {
implicitWidth: 150
implicitHeight: 200
anchors.fill: parent
TextField {
id: pathText
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()
}
}
} }
} }
@ -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 {