Newer
Older
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
import QtQuick 2.9
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.2
import QtQuick.Window 2.3
ApplicationWindow{
property var user_data
property var colors: currentActivePalette
id:userProfileDialog
height: 500
width: 500
modality:Qt.WindowModal
Layout.alignment: Qt.AlignHCenter
palette: colors
onAfterRendering: {
userProfileAvatar.url = chat.model.avatarUrl(user_data.userId).replace("mxc://", "image://MxcImage/")
userProfileName.text = user_data.userName
matrixUserID.text = user_data.userId
console.log("this is happening");
}
background: Item{
id: userProfileItem
width: userProfileDialog.width
height: userProfileDialog.height
anchors.margins: {
top:20
}
ColumnLayout{
anchors.fill: userProfileItem
width: userProfileDialog.width
spacing: 10
Avatar{
id: userProfileAvatar
height: 130
width: 130
displayName: modelData.userName
Layout.alignment: Qt.AlignHCenter
}
Label{
id: userProfileName
fontSizeMode: Text.HorizontalFit
Layout.alignment: Qt.AlignHCenter
}
Label{
id: matrixUserID
fontSizeMode: Text.HorizontalFit
Layout.alignment: Qt.AlignHCenter
}
ScrollView {
implicitHeight: userProfileDialog.height/2+20
implicitWidth: userProfileDialog.width-20
clip: true
Layout.alignment: Qt.AlignHCenter
ScrollBar.horizontal.policy: ScrollBar.AlwaysOn
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
Label {
text: "ABC"
font.pixelSize: 700
}
}
Button{
text:"OK"
onClicked: userProfileDialog.close()
anchors.margins: {
right:10
bottom:10
}
Layout.alignment: Qt.AlignRight | Qt.AlignBottom
}
}
Item { Layout.fillHeight: true }
}
}