[UI] Add settings menu.
This commit is contained in:
parent
8e115d3416
commit
7d5482c1f6
|
@ -202,7 +202,7 @@ Window {
|
|||
}
|
||||
|
||||
function hideControls() {
|
||||
if (! subtitlesMenu.visible) {
|
||||
if ( (!subtitlesMenu.visible) || (!settingsMenu.visible) ) {
|
||||
player.setOption("sub-margin-y", "22")
|
||||
controlsBar.visible = false
|
||||
controlsBackground.visible = false
|
||||
|
@ -278,9 +278,6 @@ Window {
|
|||
player.command(["cycle", "pause"])
|
||||
updateControls()
|
||||
}
|
||||
onDoubleClicked: {
|
||||
fileDialog.open()
|
||||
}
|
||||
Timer {
|
||||
id: mouseAreaPlayerTimer
|
||||
interval: 1000
|
||||
|
@ -366,6 +363,38 @@ Window {
|
|||
visible: true
|
||||
color: "transparent"
|
||||
|
||||
Rectangle {
|
||||
id: settingsMenuBackground
|
||||
anchors.fill: settingsMenu
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
visible: false
|
||||
color: "black"
|
||||
opacity: 0.6
|
||||
radius: 5
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: settingsMenu
|
||||
color: "transparent"
|
||||
width: childrenRect.width
|
||||
height: childrenRect.height
|
||||
visible: false
|
||||
anchors.right: settingsButton.right
|
||||
anchors.bottom: progressBar.top
|
||||
radius: 5
|
||||
|
||||
ColumnLayout {
|
||||
Button {
|
||||
text: "Open File"
|
||||
onClicked: fileDialog.open()
|
||||
}
|
||||
Button {
|
||||
text: "Enter Path"
|
||||
onClicked: loadDialog.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
id: subtitlesMenuBackground
|
||||
anchors.fill: subtitlesMenu
|
||||
|
@ -377,6 +406,7 @@ Window {
|
|||
radius: 5
|
||||
}
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: subtitlesMenu
|
||||
color: "transparent"
|
||||
|
@ -678,7 +708,8 @@ Window {
|
|||
anchors.bottom: parent.bottom
|
||||
display: AbstractButton.IconOnly
|
||||
onClicked: {
|
||||
loadDialog.open()
|
||||
settingsMenu.visible = !settingsMenu.visible
|
||||
settingsMenuBackground.visible = !settingsMenuBackground.visible
|
||||
}
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
|
|
Loading…
Reference in a new issue