-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMusicGridHotView.qml
59 lines (54 loc) · 1.62 KB
/
MusicGridHotView.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
import QtQml 2.12
Item{
property alias list: gridRepeater.model
Grid{
id: gridLayout
anchors.fill: parent
columns: 5
Repeater{
id: gridRepeater
Frame{
padding: 10
width: parent.width*0.2
height: parent.width*0.2+30
background: Rectangle{
id: background
color: "#00000000"
}
clip: true
MusicRoundImage{
id: img
width: parent.width
height: parent.width
imgSource: modelData.coverImgUrl
}
Text{
height: 30
anchors{
top: img.bottom
topMargin: 5
horizontalCenter: parent.horizontalCenter
}
width: parent.width
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
text: modelData.name
elide: Qt.ElideMiddle
}
MouseArea{
anchors.fill: parent
hoverEnabled: true
onEntered: {
background.color = "#50000000"
}
onExited: {
background.color = "#00000000"
}
}
}
}
}
}