-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rect_ImageMsg.qml
87 lines (80 loc) · 2.58 KB
/
Rect_ImageMsg.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import QtQuick
import QtQuick.Controls
import Qt5Compat.GraphicalEffects
Rectangle {
id: rect_ImageMsg
property int col_id: 0
property string sssss: ""
height: image1_DisplayPage.height + text1_DisplayPage.implicitHeight + row1_DisplayPage.height + 16
// radius: 10
layer.enabled: true
layer.effect: OpacityMask {
maskSource: Rectangle {
width: rect_ImageMsg.width
height: image1_DisplayPage.height + text1_DisplayPage.implicitHeight + row1_DisplayPage.height + 16
radius: 5
}
}
Image {
id: image1_DisplayPage
width: parent.width
fillMode: Image.PreserveAspectFit
anchors.horizontalCenter: parent.horizontalCenter
property string sss: "image://colors/" + (index + 1).toString()
// source: "image://colors/" + (Math.max(0,index + 0)).toString()
source: "image://colors/col" + col_id + "_" + index
// source: msg_image_id
// source: Math.random() > 0.5? "image://colors/4":"image://colors/3"
}
Text {
id: text1_DisplayPage
width: parent.width - 16
anchors.top: image1_DisplayPage.bottom
anchors.topMargin: 8
anchors.horizontalCenter: parent.horizontalCenter
wrapMode: Text.WrapAnywhere
maximumLineCount: 2
verticalAlignment: Text.AlignVCenter;
// horizontalAlignment: Text.AlignHCenter;
// text: "兄弟们,看看我的新女朋友怎么样"
text: sssss
font.pointSize: 14;
font.weight: 1000
font.wordSpacing: 5
}
Rectangle {
id: row1_DisplayPage
anchors.top: text1_DisplayPage.bottom
anchors.topMargin: 8
height: 24
width: parent.width
Image {
x: 8
source: "qrc:/2.jpg"
height: parent.height
width: height
}
Text {
x: 40
text: "胡歌"
font.pointSize: 11
font.weight: 700
anchors.verticalCenter: parent.verticalCenter
}
Image {
x: parent.width - 60
height: 20
width: height
anchors.verticalCenter: parent.verticalCenter
source: "qrc:/like.png"
}
Text {
x: parent.width - 38
text: "1234"
color: "gray"
font.pointSize: 11
font.weight: 500
anchors.verticalCenter: parent.verticalCenter
}
}
}