2019-03-22 14:28:14 +11:00
|
|
|
import QtQuick 2.7
|
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
import QtQuick.Layouts 1.4
|
2019-04-29 02:45:12 +10:00
|
|
|
import "../Base" as Base
|
2019-03-22 14:28:14 +11:00
|
|
|
|
2019-04-29 01:01:38 +10:00
|
|
|
Base.HGlassRectangle {
|
2019-04-21 07:36:21 +10:00
|
|
|
property string displayName: ""
|
|
|
|
property string topic: ""
|
|
|
|
|
2019-04-29 04:20:30 +10:00
|
|
|
id: roomHeader
|
2019-04-29 01:01:38 +10:00
|
|
|
color: Base.HStyle.chat.roomHeader.background
|
2019-03-22 14:28:14 +11:00
|
|
|
|
2019-04-29 04:20:30 +10:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.preferredHeight: 32
|
|
|
|
|
|
|
|
Base.HRowLayout {
|
2019-04-21 07:45:51 +10:00
|
|
|
id: row
|
2019-04-29 04:20:30 +10:00
|
|
|
spacing: 8
|
2019-03-26 09:29:46 +11:00
|
|
|
anchors.fill: parent
|
2019-03-22 14:28:14 +11:00
|
|
|
|
2019-04-29 01:21:19 +10:00
|
|
|
Base.HAvatar {
|
2019-04-21 07:45:51 +10:00
|
|
|
id: avatar
|
2019-04-21 07:36:21 +10:00
|
|
|
name: displayName
|
2019-04-29 04:20:30 +10:00
|
|
|
dimension: roomHeader.height
|
|
|
|
Layout.alignment: Qt.AlignTop
|
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-04-27 06:02:20 +10:00
|
|
|
font.pixelSize: Base.HStyle.fontSize.big
|
2019-03-26 09:29:46 +11:00
|
|
|
elide: Text.ElideRight
|
|
|
|
maximumLineCount: 1
|
2019-04-29 04:20:30 +10:00
|
|
|
Layout.maximumWidth: row.width - row.totalSpacing - 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-04-27 06:02:20 +10:00
|
|
|
font.pixelSize: Base.HStyle.fontSize.small
|
2019-03-26 09:29:46 +11:00
|
|
|
elide: Text.ElideRight
|
|
|
|
maximumLineCount: 1
|
2019-03-26 20:52:43 +11:00
|
|
|
Layout.maximumWidth:
|
2019-04-29 04:20:30 +10:00
|
|
|
row.width - row.totalSpacing - 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
|
|
|
}
|
|
|
|
}
|