Begin implementing UI design, implement metadata fetching
This commit is contained in:
136
Main.qml
136
Main.qml
@@ -13,80 +13,96 @@ ApplicationWindow {
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 10
|
||||
|
||||
RowLayout {
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
height: 43
|
||||
|
||||
Label {
|
||||
text: "QYouRadio"
|
||||
heading: "h3"
|
||||
font.bold: true
|
||||
}
|
||||
color: Colors.surface0
|
||||
|
||||
// Item {
|
||||
// Layout.fillWidth: true
|
||||
// }
|
||||
|
||||
Rectangle {
|
||||
Layout.leftMargin: 20
|
||||
visible: Player.currentIndex != null
|
||||
color: Colors.primary
|
||||
radius: 5
|
||||
clip: true
|
||||
width: 320
|
||||
height: 36
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 3
|
||||
|
||||
Label {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: 1
|
||||
anchors.leftMargin: 4
|
||||
anchors.rightMargin: 4
|
||||
text: (Player.loading ? "Loading " : "Playing ") + (Player.currentIndex != null ? qsTr(Player.currentStream.name) : "")
|
||||
heading: "h2"
|
||||
Layout.leftMargin: 5
|
||||
text: "QYouRadio"
|
||||
heading: "h1"
|
||||
// font.bold: true
|
||||
}
|
||||
|
||||
Label {
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottomMargin: 1
|
||||
anchors.leftMargin: 4
|
||||
anchors.rightMargin: 4
|
||||
text: "Title will go here"
|
||||
heading: "h4"
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
Layout.leftMargin: 5
|
||||
visible: Player.currentIndex != null
|
||||
color: Colors.primary
|
||||
radius: 5
|
||||
clip: true
|
||||
width: 320
|
||||
height: 36
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Label {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: 1
|
||||
anchors.leftMargin: 4
|
||||
anchors.rightMargin: 4
|
||||
text: (Player.loading ? "Loading " : "Playing ") + (Player.currentIndex != null ? qsTr(Player.currentStream.name) : "")
|
||||
heading: "h5"
|
||||
}
|
||||
|
||||
TabBar {
|
||||
id: tabbar
|
||||
spacing: 10
|
||||
Label {
|
||||
id: nowplaying_title
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottomMargin: 1
|
||||
anchors.leftMargin: 4
|
||||
anchors.rightMargin: 4
|
||||
text: (Player.currentIndex != null ? qsTr(Player.currentStream.title) : "")
|
||||
heading: "h3"
|
||||
|
||||
background: Item{}
|
||||
SequentialAnimation {
|
||||
running: true
|
||||
loops: Animation.Infinite
|
||||
|
||||
TabButton {
|
||||
text: qsTr("Autoradio")
|
||||
NumberAnimation { target: nowplaying_title; property: "anchors.rightMargin"; from: 0; to: 320; duration: 5000 }
|
||||
NumberAnimation { target: nowplaying_title; property: "anchors.leftMargin"; from: 0; to: 320; duration: 5000 }
|
||||
}
|
||||
}
|
||||
}
|
||||
TabButton {
|
||||
text: qsTr("Live Mix")
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
TabButton {
|
||||
text: qsTr("Deep Bass")
|
||||
}
|
||||
}
|
||||
Button {
|
||||
text: "S"
|
||||
onClicked: function() {
|
||||
var component = Qt.createComponent("ViewSettings.qml")
|
||||
var window = component.createObject(root)
|
||||
window.show()
|
||||
|
||||
TabBar {
|
||||
id: tabbar
|
||||
spacing: 10
|
||||
|
||||
background: Item{}
|
||||
|
||||
TabButton {
|
||||
text: qsTr("Autoradio")
|
||||
}
|
||||
TabButton {
|
||||
text: qsTr("Live Mix")
|
||||
}
|
||||
TabButton {
|
||||
text: qsTr("Deep Bass")
|
||||
}
|
||||
TabButton {
|
||||
text: qsTr("Settings")
|
||||
}
|
||||
}
|
||||
// Button {
|
||||
// text: "S"
|
||||
// onClicked: function() {
|
||||
// var component = Qt.createComponent("ViewSettings.qml")
|
||||
// var window = component.createObject(root)
|
||||
// window.show()
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +110,7 @@ ApplicationWindow {
|
||||
SwipeView {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.margins: 10
|
||||
Layout.margins: 20
|
||||
|
||||
interactive: false
|
||||
currentIndex: tabbar.currentIndex
|
||||
|
||||
Reference in New Issue
Block a user