moment/harmonyqml/components/Chat/RoomSidePane/MembersView.qml

42 lines
1022 B
QML
Raw Normal View History

2019-05-13 03:17:42 +10:00
import QtQuick 2.7
import QtQuick.Layouts 1.3
import "../../Base"
HColumnLayout {
2019-05-13 03:17:42 +10:00
property int normalSpacing: 8
2019-05-14 03:15:03 +10:00
HListView {
2019-05-13 03:17:42 +10:00
id: memberList
spacing: normalSpacing
2019-05-13 03:17:42 +10:00
topMargin: spacing
bottomMargin: topMargin
Layout.leftMargin: roomSidePane.collapsed ? 0 : normalSpacing
Layout.rightMargin: Layout.leftMargin
2019-05-13 03:17:42 +10:00
Behavior on spacing {
2019-05-15 05:15:10 +10:00
NumberAnimation { duration: HStyle.animationDuration }
2019-05-13 03:17:42 +10:00
}
2019-05-16 05:59:43 +10:00
model: chatPage.roomInfo.sortedMembers
2019-05-13 03:17:42 +10:00
delegate: MemberDelegate {}
Layout.fillWidth: true
Layout.fillHeight: true
2019-05-13 03:17:42 +10:00
}
HTextField {
id: filterField
placeholderText: qsTr("Filter members")
backgroundColor: HStyle.sidePane.filterRooms.background
onTextChanged: Backend.clients.get(chatPage.userId).setMemberFilter(
chatPage.category, chatPage.roomId, text
)
Layout.fillWidth: true
Layout.preferredHeight: HStyle.bottomElementsHeight
}
2019-05-13 03:17:42 +10:00
}