mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-25 23:06:23 +02:00
change artist selection to according to design mockup
This commit is contained in:
@@ -15,15 +15,39 @@ Item {
|
|||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: upperColumn
|
id: upperColumn
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.fill: parent
|
||||||
height: parent.height
|
anchors.margins: defaultFontHeight
|
||||||
width: defaultFontHeight * 30
|
|
||||||
anchors.bottomMargin: defaultFontHeight
|
|
||||||
spacing: defaultFontHeight
|
spacing: defaultFontHeight
|
||||||
|
|
||||||
HeaderLabel {
|
HeaderLabel {
|
||||||
id: headerText
|
id: headerText
|
||||||
text: "Enter or pick an artist"
|
text: "Pick one of your top artists,"
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
height: parent.height - headerText.height*2 - artistInputField.height - parent.spacing * 3
|
||||||
|
width: parent.width
|
||||||
|
ArtistView {
|
||||||
|
id: artistView
|
||||||
|
height: parent.height
|
||||||
|
width: parent.width
|
||||||
|
model: artistChartsModel
|
||||||
|
clip: true
|
||||||
|
cellWidth: defaultFontHeight * 12
|
||||||
|
cellHeight: defaultFontHeight * 12
|
||||||
|
spacing: defaultFontHeight / 2
|
||||||
|
|
||||||
|
onItemClicked: {
|
||||||
|
createStation(artistChartsModel.itemFromIndex(index).artistName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ScrollBar {
|
||||||
|
listView: artistView
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HeaderLabel {
|
||||||
|
text: "Or enter an artist name"
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
@@ -40,30 +64,10 @@ Item {
|
|||||||
|
|
||||||
PushButton {
|
PushButton {
|
||||||
id: createFromInputButton
|
id: createFromInputButton
|
||||||
text: "Go!"
|
text: "Create station"
|
||||||
enabled: artistInputField.text.length > 2
|
enabled: artistInputField.text.length > 2
|
||||||
onClicked: createStation(artistInputField.text)
|
onClicked: createStation(artistInputField.text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
|
||||||
height: parent.height - headerText.height - artistInputField.height - parent.spacing * 3
|
|
||||||
width: parent.width
|
|
||||||
ArtistView {
|
|
||||||
id: artistView
|
|
||||||
height: parent.height
|
|
||||||
width: parent.width
|
|
||||||
model: artistChartsModel
|
|
||||||
clip: true
|
|
||||||
delegateHeight: defaultFontHeight * 6
|
|
||||||
|
|
||||||
onItemClicked: {
|
|
||||||
createStation(artistChartsModel.itemFromIndex(index).artistName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ScrollBar {
|
|
||||||
listView: artistView
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,16 +1,14 @@
|
|||||||
import QtQuick 1.1
|
import QtQuick 1.1
|
||||||
import tomahawk 1.0
|
import tomahawk 1.0
|
||||||
|
|
||||||
ListView {
|
GridView {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property int delegateHeight: defaultFontHeight * 3
|
|
||||||
|
|
||||||
signal itemClicked(int index)
|
signal itemClicked(int index)
|
||||||
|
property int spacing
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
width: parent.width
|
width: root.cellWidth - root.spacing / 2
|
||||||
height: root.delegateHeight
|
height: root.cellHeight - root.spacing / 2
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: background
|
id: background
|
||||||
@@ -41,24 +39,13 @@ ListView {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
|
||||||
anchors.fill: parent
|
|
||||||
spacing: defaultFontHeight
|
|
||||||
|
|
||||||
CoverImage {
|
CoverImage {
|
||||||
id: coverImage
|
id: coverImage
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: height
|
width: height
|
||||||
showLabels: false
|
showLabels: true
|
||||||
artworkId: model.coverID
|
artworkId: model.coverID
|
||||||
}
|
artistName: model.artistName
|
||||||
Text {
|
|
||||||
text: model.artistName
|
|
||||||
color: "white"
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
width: parent.width - coverImage.width - parent.spacing
|
|
||||||
elide: Text.ElideRight
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
Reference in New Issue
Block a user