mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 17:14:00 +02:00
add artist mode for stations
This commit is contained in:
@@ -7,6 +7,8 @@ Item {
|
||||
property bool showLabels: true
|
||||
// Should the play button be painted on mouse hover?
|
||||
property bool showPlayButton: false
|
||||
// Should the mirror be painted?
|
||||
property bool showMirror: false
|
||||
|
||||
// Labels & Cover
|
||||
property string artistName
|
||||
@@ -95,7 +97,7 @@ Item {
|
||||
|
||||
Loader {
|
||||
id: mirroredCover
|
||||
sourceComponent: coverImage
|
||||
sourceComponent: parent.showMirror ? coverImage : undefined
|
||||
anchors.fill: parent
|
||||
transform : [
|
||||
Rotation {
|
||||
|
@@ -57,19 +57,31 @@ Rectangle {
|
||||
width: scene.width
|
||||
spacing: width * .1
|
||||
|
||||
GridView {
|
||||
id: gridView
|
||||
Item {
|
||||
height: parent.height
|
||||
width: (parent.width - orText.width - parent.spacing * 2 ) * 2 / 3
|
||||
model: dummyArtistModel
|
||||
GridView {
|
||||
id: gridView
|
||||
anchors.fill: parent
|
||||
anchors.margins: cellWidth / 2
|
||||
model: dummyArtistModel
|
||||
|
||||
delegate: Item {
|
||||
height: gridView.height / 3;
|
||||
width: height
|
||||
cellWidth: gridView.width / 4 - 1 // -1 to make sure there is space for 4 items even with rounding error
|
||||
cellHeight: cellWidth
|
||||
|
||||
CoverImage {
|
||||
artistName: modelData
|
||||
anchors.fill: parent
|
||||
delegate: Item {
|
||||
height: gridView.cellHeight * .9
|
||||
width: height
|
||||
|
||||
CoverImage {
|
||||
artistName: modelData
|
||||
anchors.fill: parent
|
||||
|
||||
onClicked: {
|
||||
echonestStation.setMainControl( EchonestStation.StationTypeArtist, modelData );
|
||||
stationListView.incrementCurrentIndex();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,7 +101,7 @@ Rectangle {
|
||||
opacity: echonestStation.configured ? 0 : 1
|
||||
|
||||
onTagClicked: {
|
||||
echonestStation.setMainControl( item );
|
||||
echonestStation.setMainControl( EchonestStation.StationTypeStyle, item );
|
||||
stationListView.incrementCurrentIndex();
|
||||
}
|
||||
|
||||
|
@@ -29,6 +29,7 @@ Item {
|
||||
width: root.coverSize
|
||||
|
||||
showLabels: false
|
||||
showMirror: true
|
||||
//artistName: model.artistName
|
||||
//trackName: model.trackName
|
||||
artworkId: model.coverID
|
||||
|
Reference in New Issue
Block a user