-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMsgbox.qml
199 lines (175 loc) · 5.03 KB
/
Msgbox.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
import QtQuick 2.0
Item {
id:msgbox
anchors.fill: parent
Rectangle{
id:toolbar
width: parent.width
height: 130
color: '#171717'
anchors.top: parent.top
opacity: 0
SequentialAnimation{
running: msgbox.visible
NumberAnimation {
target: toolbar
property: "opacity"
from:0
to:1
duration: 300
easing.type: Easing.OutBounce
}
NumberAnimation {
target: logo
property: "opacity"
from:0
to:1
duration: 300
easing.type: Easing.OutBounce
}
NumberAnimation {
target: btnnote
property: "opacity"
from:0
to:1
duration: 300
easing.type: Easing.OutBounce
}
}
Image {
id: logo
opacity: 0
source: "image/logotype.png"
width: 161
height: 32
anchors.left: parent.left
anchors.top: parent.top
anchors.topMargin: 20
anchors.leftMargin: 20
}
Image {
id: settings
source: "image/settings.png"
width: 23
height: 23
anchors.right: parent.right
anchors.top: parent.top
anchors.rightMargin: 20
anchors.topMargin: 20
}
Rectangle{
anchors.top: logo.bottom
anchors.topMargin: 20
width: parent.width-40
anchors.horizontalCenter: parent.horizontalCenter
height: 40
border.width: 1
color: '#171717'
border.color: '#363636'
radius: 6
Image {
id: search
source: "image/search.png"
opacity: 0.3
width: 15
height: 15
anchors.left: parent.left
anchors.leftMargin: 10
anchors.verticalCenter: parent.verticalCenter
}
Text {
text:"SEARCH"
anchors.left: parent.left
anchors.leftMargin: 30
anchors.verticalCenter: parent.verticalCenter
color: '#575757'
}
}
}
ListModel {
id:modelmsg
ListElement {
name: "Bill Smith"
}
}
ListView {
id:listw
width: parent.width
anchors.top: toolbar.bottom
anchors.bottom: parent.bottom
clip: true
model: modelmsg
delegate: Item{
width: parent.width
height: 80
Item{
width: parent.width
height: 78
Rectangle{
id:avatar
width: 50
color: '#363636'
height: 50
radius: 100
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 20
Text {
text: "M"
color: '#fff'
anchors.centerIn: parent
font.pointSize: 20
}
}
Text {
id:user
text: "@milad_dv"
color: '#999'
font.weight: Font.Bold
anchors.top: parent.top
anchors.topMargin: 20
anchors.left: avatar.right
anchors.leftMargin: 20
font.pointSize: 13
}
Text {
text: "خیلی تست میباشد و جهت نمایش در اپ قرار گرفته است ..."
color: '#666'
anchors.top: user.bottom
anchors.topMargin: 10
anchors.left: avatar.right
clip: true
anchors.leftMargin: 20
font.pointSize: 11
}
}
}
}
Rectangle{
id:btnnote
opacity: 0
width: 60
height: 60
color: '#ff3434'
radius: 100
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.rightMargin: 20
anchors.bottomMargin: 20
Image {
source: "qrc:/image/new.png"
anchors.centerIn: parent
width: 30
height: 30
}
MouseArea{
anchors.fill: parent
onClicked: {
root.state = 'Chat';
}
}
}
Component.onCompleted: {
listw.currentIndex = modelmsg.count - 1;
}
}