mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-09-05 03:51:45 +02:00
pimped cover gradient
This commit is contained in:
@@ -64,17 +64,28 @@ Item {
|
|||||||
source: "image://albumart/" + artworkId
|
source: "image://albumart/" + artworkId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: itemGlow
|
||||||
|
color: "white"
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
opacity: mouseArea.containsMouse ? .2 : 0
|
||||||
|
|
||||||
|
Behavior on opacity {
|
||||||
|
NumberAnimation { easing.type: Easing.Linear; duration: 300 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: textBackground
|
id: textBackground
|
||||||
anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
|
anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
|
||||||
anchors.margins: -1
|
anchors.margins: -1
|
||||||
height: (artistText.height + trackText.height) * 2
|
height: (artistText.height + trackText.height) * 3
|
||||||
opacity: 1// showLabels ? 1 : 0
|
opacity: showLabels ? 1 : 0
|
||||||
radius: 3
|
|
||||||
gradient: Gradient {
|
gradient: Gradient {
|
||||||
GradientStop { position: 0.0; color: "#00000000" }
|
GradientStop { position: 0.0; color: "#00000000" }
|
||||||
GradientStop { position: 0.75; color: "black" }
|
GradientStop { position: 0.6; color: "#E1000000" }
|
||||||
GradientStop { position: 1.0; color: "black" }
|
GradientStop { position: 1.0; color: "#E1000000" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,13 +104,14 @@ Item {
|
|||||||
Text {
|
Text {
|
||||||
id: artistText
|
id: artistText
|
||||||
color: "white"
|
color: "white"
|
||||||
|
font.bold: trackText.text.length == 0
|
||||||
text: artistName
|
text: artistName
|
||||||
anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
|
anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
|
||||||
anchors.margins: root.height / 20
|
anchors.margins: root.height / 20
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
opacity: showLabels ? 1 : 0
|
opacity: showLabels ? 1 : 0
|
||||||
font.pixelSize: root.height / 15
|
font.pixelSize: trackText.text.length == 0 ? root.height / 10 : root.height / 15
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,24 +151,6 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: itemGlow
|
|
||||||
color: "white"
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.bottomMargin: - parent.height
|
|
||||||
|
|
||||||
// scaling might be off a pixel... make sure that the shadow is at least as large as the image
|
|
||||||
anchors.leftMargin: -2
|
|
||||||
anchors.rightMargin: -2
|
|
||||||
anchors.topMargin: -2
|
|
||||||
|
|
||||||
opacity: mouseArea.containsMouse ? .2 : 0
|
|
||||||
|
|
||||||
Behavior on opacity {
|
|
||||||
NumberAnimation { easing.type: Easing.Linear; duration: 300 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: mirrorShadow
|
id: mirrorShadow
|
||||||
color: parent.backgroundColor
|
color: parent.backgroundColor
|
||||||
|
@@ -71,12 +71,13 @@ Rectangle {
|
|||||||
cellHeight: cellWidth
|
cellHeight: cellWidth
|
||||||
|
|
||||||
delegate: Item {
|
delegate: Item {
|
||||||
height: gridView.cellHeight * .9
|
height: gridView.cellHeight// * .9
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
CoverImage {
|
CoverImage {
|
||||||
artistName: modelData
|
artistName: modelData
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
showPlayButton: true
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
rootView.startStationFromArtist(modelData);
|
rootView.startStationFromArtist(modelData);
|
||||||
|
Reference in New Issue
Block a user