2019-03-22 14:28:14 +11:00
|
|
|
import QtQuick 2.7
|
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
import QtQuick.Layouts 1.4
|
2019-03-26 20:52:43 +11:00
|
|
|
import "../base" as Base
|
2019-03-22 14:28:14 +11:00
|
|
|
|
|
|
|
Rectangle {
|
2019-04-21 07:36:21 +10:00
|
|
|
property string displayName: ""
|
|
|
|
property string topic: ""
|
|
|
|
|
2019-04-21 07:45:51 +10:00
|
|
|
id: root
|
2019-03-22 14:28:14 +11:00
|
|
|
Layout.fillWidth: true
|
2019-03-26 18:19:55 +11:00
|
|
|
Layout.minimumHeight: 36
|
2019-03-22 14:28:14 +11:00
|
|
|
Layout.maximumHeight: Layout.minimumHeight
|
|
|
|
color: "#BBB"
|
|
|
|
|
2019-03-26 09:29:46 +11:00
|
|
|
RowLayout {
|
2019-04-21 07:45:51 +10:00
|
|
|
id: row
|
2019-03-26 09:29:46 +11:00
|
|
|
spacing: 12
|
|
|
|
anchors.fill: parent
|
2019-03-22 14:28:14 +11:00
|
|
|
|
2019-03-26 20:52:43 +11:00
|
|
|
Base.Avatar {
|
2019-04-21 07:45:51 +10:00
|
|
|
id: avatar
|
2019-03-26 09:29:46 +11:00
|
|
|
Layout.alignment: Qt.AlignTop
|
|
|
|
dimmension: root.Layout.minimumHeight
|
2019-04-21 07:36:21 +10:00
|
|
|
name: displayName
|
2019-03-26 09:29:46 +11:00
|
|
|
}
|
|
|
|
|
2019-03-26 20:52:43 +11:00
|
|
|
Base.HLabel {
|
2019-04-21 07:45:51 +10:00
|
|
|
id: roomName
|
2019-04-21 07:36:21 +10:00
|
|
|
text: displayName
|
2019-03-26 09:29:46 +11:00
|
|
|
font.pixelSize: bigSize
|
|
|
|
elide: Text.ElideRight
|
|
|
|
maximumLineCount: 1
|
2019-04-21 07:36:21 +10:00
|
|
|
Layout.maximumWidth:
|
|
|
|
row.width - row.spacing * (row.children.length - 1) -
|
|
|
|
avatar.width
|
2019-03-26 09:29:46 +11:00
|
|
|
}
|
2019-03-22 14:28:14 +11:00
|
|
|
|
2019-03-26 20:52:43 +11:00
|
|
|
Base.HLabel {
|
2019-04-21 07:45:51 +10:00
|
|
|
id: roomTopic
|
2019-04-21 07:36:21 +10:00
|
|
|
text: topic
|
2019-03-26 09:29:46 +11:00
|
|
|
font.pixelSize: smallSize
|
|
|
|
elide: Text.ElideRight
|
|
|
|
maximumLineCount: 1
|
2019-03-26 20:52:43 +11:00
|
|
|
Layout.maximumWidth:
|
|
|
|
row.width -
|
|
|
|
row.spacing * (row.children.length - 1) -
|
|
|
|
avatar.width -
|
|
|
|
roomName.width
|
2019-03-22 14:28:14 +11:00
|
|
|
}
|
2019-03-26 09:29:46 +11:00
|
|
|
|
|
|
|
Item { Layout.fillWidth: true }
|
2019-03-22 14:28:14 +11:00
|
|
|
}
|
|
|
|
}
|