2019-07-08 13:52:41 +10:00
|
|
|
// Copyright 2019 miruka
|
|
|
|
// This file is part of harmonyqml, licensed under LGPLv3.
|
|
|
|
|
2019-05-13 03:17:42 +10:00
|
|
|
import QtQuick 2.7
|
|
|
|
import QtQuick.Layouts 1.3
|
|
|
|
import "../../Base"
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
id: memberDelegate
|
|
|
|
width: memberList.width
|
|
|
|
height: childrenRect.height
|
|
|
|
|
2019-07-08 12:41:32 +10:00
|
|
|
property var memberInfo: users.find(model.userId)
|
2019-05-13 03:17:42 +10:00
|
|
|
|
|
|
|
HRowLayout {
|
|
|
|
width: parent.width
|
|
|
|
spacing: memberList.spacing
|
|
|
|
|
2019-07-07 14:24:23 +10:00
|
|
|
HUserAvatar {
|
|
|
|
id: avatar
|
2019-07-07 19:15:18 +10:00
|
|
|
userId: model.userId
|
2019-05-13 03:17:42 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
HColumnLayout {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.maximumWidth:
|
2019-07-07 14:24:23 +10:00
|
|
|
parent.width - parent.totalSpacing - avatar.width
|
2019-05-13 03:17:42 +10:00
|
|
|
|
|
|
|
HLabel {
|
|
|
|
id: memberName
|
2019-07-07 14:24:23 +10:00
|
|
|
text: memberInfo.displayName || model.userId
|
2019-05-13 03:17:42 +10:00
|
|
|
elide: Text.ElideRight
|
|
|
|
maximumLineCount: 1
|
|
|
|
verticalAlignment: Qt.AlignVCenter
|
|
|
|
|
|
|
|
Layout.maximumWidth: parent.width
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|