[UI] Minor tweaks, layout changes and more customizability.
This commit is contained in:
parent
14116cb507
commit
0f7327bfca
|
@ -79,9 +79,7 @@ Item {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: controlsBackground
|
id: controlsBackground
|
||||||
height: controlsBar.visible ? controlsBar.height + progressBackground.height
|
height: controlsBar.visible ? controlsBar.height + (fun.nyanCat ? progressBackground.height * 0.3: progressBackground.height * 2) : 0
|
||||||
+ (progressBar.topPadding * 2)
|
|
||||||
- (progressBackground.height * 2) : 0
|
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
@ -98,7 +96,7 @@ Item {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: parent.width / 128
|
anchors.leftMargin: parent.width / 128
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.bottomMargin: 1
|
anchors.bottomMargin: 2
|
||||||
visible: true
|
visible: true
|
||||||
|
|
||||||
Slider {
|
Slider {
|
||||||
|
@ -152,7 +150,7 @@ Item {
|
||||||
mouseAreaProgressBar.containsMouse)
|
mouseAreaProgressBar.containsMouse)
|
||||||
width: progressBar.availableWidth
|
width: progressBar.availableWidth
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
color: Qt.rgba(255, 255, 255, 0.6)
|
color: appearance.progressBackgroundColor
|
||||||
ProgressBar {
|
ProgressBar {
|
||||||
id: cachedLength
|
id: cachedLength
|
||||||
background: Item {}
|
background: Item {}
|
||||||
|
@ -160,7 +158,7 @@ Item {
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: cachedLength.visualPosition * parent.width
|
width: cachedLength.visualPosition * parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
color: "white"
|
color: appearance.progressCachedColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
z: 40
|
z: 40
|
||||||
|
@ -219,14 +217,18 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: layout
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 2
|
||||||
|
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: playlistPrevButton
|
id: playlistPrevButton
|
||||||
objectName: "playlistPrevButton"
|
objectName: "playlistPrevButton"
|
||||||
icon.source: "icons/prev.svg"
|
icon.source: "icons/prev.svg"
|
||||||
icon.color: appearance.buttonColor
|
icon.color: appearance.buttonColor
|
||||||
display: AbstractButton.IconOnly
|
display: AbstractButton.IconOnly
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
visible: false
|
visible: false
|
||||||
width: visible ? playPauseButton.width : 0
|
width: visible ? playPauseButton.width : 0
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -249,9 +251,6 @@ Item {
|
||||||
icon.source: "icons/pause.svg"
|
icon.source: "icons/pause.svg"
|
||||||
icon.color: appearance.buttonColor
|
icon.color: appearance.buttonColor
|
||||||
display: AbstractButton.IconOnly
|
display: AbstractButton.IconOnly
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.left: playlistPrevButton.right
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
player.playerCommand(Enums.Commands.TogglePlayPause)
|
player.playerCommand(Enums.Commands.TogglePlayPause)
|
||||||
}
|
}
|
||||||
|
@ -273,9 +272,6 @@ Item {
|
||||||
icon.source: "icons/next.svg"
|
icon.source: "icons/next.svg"
|
||||||
icon.color: appearance.buttonColor
|
icon.color: appearance.buttonColor
|
||||||
display: AbstractButton.IconOnly
|
display: AbstractButton.IconOnly
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.left: playPauseButton.right
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
player.playerCommand(Enums.Commands.NextPlaylistItem)
|
player.playerCommand(Enums.Commands.NextPlaylistItem)
|
||||||
}
|
}
|
||||||
|
@ -288,9 +284,6 @@ Item {
|
||||||
icon.source: "icons/volume-up.svg"
|
icon.source: "icons/volume-up.svg"
|
||||||
icon.color: appearance.buttonColor
|
icon.color: appearance.buttonColor
|
||||||
display: AbstractButton.IconOnly
|
display: AbstractButton.IconOnly
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.left: playlistNextButton.right
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
player.playerCommand(Enums.Commands.ToggleMute)
|
player.playerCommand(Enums.Commands.ToggleMute)
|
||||||
}
|
}
|
||||||
|
@ -321,10 +314,6 @@ Item {
|
||||||
background ? background.implicitHeight : 0,
|
background ? background.implicitHeight : 0,
|
||||||
(handle ? handle.implicitHeight : 0)
|
(handle ? handle.implicitHeight : 0)
|
||||||
+ topPadding + bottomPadding)
|
+ topPadding + bottomPadding)
|
||||||
|
|
||||||
anchors.left: volumeButton.right
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
onMoved: {
|
onMoved: {
|
||||||
player.playerCommand(Enums.Commands.SetVolume, Math.round(volumeBar.value).toString())
|
player.playerCommand(Enums.Commands.SetVolume, Math.round(volumeBar.value).toString())
|
||||||
}
|
}
|
||||||
|
@ -365,9 +354,6 @@ Item {
|
||||||
objectName: "timeLabel"
|
objectName: "timeLabel"
|
||||||
text: "0:00 / 0:00"
|
text: "0:00 / 0:00"
|
||||||
color: "white"
|
color: "white"
|
||||||
anchors.left: volumeBar.right
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
padding: 2
|
padding: 2
|
||||||
font.family: appearance.fontName
|
font.family: appearance.fontName
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
|
@ -380,15 +366,16 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: settingsButton
|
id: settingsButton
|
||||||
//icon.name: "settings"
|
//icon.name: "settings"
|
||||||
icon.source: "icons/settings.svg"
|
icon.source: "icons/settings.svg"
|
||||||
icon.color: appearance.buttonColor
|
icon.color: appearance.buttonColor
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||||
anchors.right: fullscreenButton.left
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
display: AbstractButton.IconOnly
|
display: AbstractButton.IconOnly
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.log("Settings Menu Not Yet Implemented.")
|
console.log("Settings Menu Not Yet Implemented.")
|
||||||
|
@ -402,9 +389,7 @@ Item {
|
||||||
icon.source: "icons/fullscreen.svg"
|
icon.source: "icons/fullscreen.svg"
|
||||||
icon.color: appearance.buttonColor
|
icon.color: appearance.buttonColor
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
display: AbstractButton.IconOnly
|
display: AbstractButton.IconOnly
|
||||||
onClicked: {
|
onClicked: {
|
||||||
toggleFullscreen()
|
toggleFullscreen()
|
||||||
|
@ -414,3 +399,4 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import "codes.js" as LanguageCodes
|
||||||
MenuBar {
|
MenuBar {
|
||||||
id: menuBar
|
id: menuBar
|
||||||
//width: parent.width
|
//width: parent.width
|
||||||
height: Math.max(24, Screen.height / 32)
|
height: Screen.height / 32
|
||||||
function anythingOpen() {
|
function anythingOpen() {
|
||||||
for (var i = 0, len = menuBar.count; i < len; i++) {
|
for (var i = 0, len = menuBar.count; i < len; i++) {
|
||||||
if (menuBar.menuAt(i).opened) { return true }
|
if (menuBar.menuAt(i).opened) { return true }
|
||||||
|
|
|
@ -27,6 +27,8 @@ ApplicationWindow {
|
||||||
property bool useMpvSubs: false
|
property bool useMpvSubs: false
|
||||||
property string fontName: "Roboto"
|
property string fontName: "Roboto"
|
||||||
property string mainBackground: "#9C000000"
|
property string mainBackground: "#9C000000"
|
||||||
|
property string progressBackgroundColor: "#3CFFFFFF"
|
||||||
|
property string progressCachedColor: "white"
|
||||||
property string buttonColor: "white"
|
property string buttonColor: "white"
|
||||||
property string progressSliderColor: "red"
|
property string progressSliderColor: "red"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue