summaryrefslogtreecommitdiff
path: root/Friends.ui.qml
blob: e9602116ba8a16782e8e472625456c3f90a4ca0b (plain)
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
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import Bootstrap 5.3

Flickable {
	property string titleText: qsTr("Friends")
	property alias listView: listView
	contentHeight: container.height + 28

	ColumnLayout {
		id: container
		anchors {
			top: parent.top
			topMargin: 28
			left: parent.left
			leftMargin: 20
			right: parent.right
			rightMargin: 20
		}

		Label {
			text: titleText
			Bootstrap.heading: 2
			Layout.bottomMargin: 28
		}

		ListView {
			id: listView
			Layout.fillWidth: true
			interactive: false
			implicitHeight: count * 88.5
			model: ListModel {
				ListElement {
					image: "https://offsetcode.com/themes/messenger/2.2.0/assets/img/avatars/6.jpg"
					name: "Bill Marrow"
					status: qsTr("last seen 3 days ago")
				}
				ListElement {
					image: "https://offsetcode.com/themes/messenger/2.2.0/assets/img/avatars/5.jpg"
					name: "Damien Binder"
					status: qsTr("last seen within a week")
				}
				ListElement {
					image: ""
					name: "Don Knight"
					status: qsTr("online")
				}
			}
			delegate: Card {
				Bootstrap.mode: ApplicationWindow.window
					.Bootstrap.mode
				width: listView.width
				imageSource: image
				nameText: name
				statusText: status
			}
		}
	}
}