-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMetaBox.qml
58 lines (52 loc) · 1.39 KB
/
MetaBox.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
import QtQuick 2.8
import QtQuick.Layouts 1.11
Rectangle {
id: root
property string metaTitle
property string metaContent
width: vpx(66)
height: vpx(66)
color: "transparent"
RowLayout {
id: rowcontent
anchors.verticalCenter: root.verticalCenter
anchors.horizontalCenter: root.horizontalCenter
Rectangle {
id: metaBox
width: root.width
height: root.height
color: "#f6f6f6"
clip: true
Text {
text: metaTitle
color: "black"
width: parent.width
font.family: subheaderFont.name
fontSizeMode: Text.Fit; minimumPixelSize: vpx(8); font.pixelSize: vpx(10)
font.weight: Font.Bold
font.capitalization: Font.AllUppercase
horizontalAlignment: Text.AlignHCenter
padding: vpx(4)
anchors {
bottom: parent.bottom;
left: parent.left; right: parent.right
}
}
Text {
id: metaValue
text: metaContent
color: "black"
width: parent.width
height: parent.height
font.family: headerFont.name
font.weight: Font.Bold
font.capitalization: Font.AllUppercase
fontSizeMode: Text.Fit; minimumPixelSize: vpx(10); font.pixelSize: vpx(44)
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
padding: vpx(10)
Behavior on text { FadeAnimation { target: metaValue }}
}
}
}
}