Improve RoomDrawer.
This commit is contained in:
@@ -80,56 +80,83 @@ Drawer {
|
|||||||
|
|
||||||
padding: 0
|
padding: 0
|
||||||
|
|
||||||
contentItem: RowLayout {
|
contentItem: ColumnLayout {
|
||||||
spacing: 8
|
RowLayout {
|
||||||
|
|
||||||
MaterialIcon {
|
|
||||||
Layout.preferredWidth: 32
|
|
||||||
Layout.preferredHeight: 32
|
|
||||||
Layout.alignment: Qt.AlignTop
|
|
||||||
|
|
||||||
icon: "\ue88f"
|
|
||||||
color: MPalette.lighter
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
Label {
|
visible: room && room.canonicalAlias
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
wrapMode: Label.Wrap
|
spacing: 8
|
||||||
text: room && room.canonicalAlias ? room.canonicalAlias : "No Canonical Alias"
|
|
||||||
color: MPalette.accent
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
MaterialIcon {
|
||||||
Layout.fillWidth: true
|
Layout.preferredWidth: 32
|
||||||
|
Layout.preferredHeight: 32
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
|
|
||||||
wrapMode: Label.Wrap
|
icon: "\ue2bc"
|
||||||
text: "Main Alias"
|
|
||||||
color: MPalette.lighter
|
color: MPalette.lighter
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
wrapMode: Label.Wrap
|
Label {
|
||||||
text: room && room.topic ? room.topic : "No Topic"
|
Layout.fillWidth: true
|
||||||
color: MPalette.foreground
|
|
||||||
|
wrapMode: Label.Wrap
|
||||||
|
text: room && room.canonicalAlias ? room.canonicalAlias : "No Canonical Alias"
|
||||||
|
color: MPalette.accent
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
wrapMode: Label.Wrap
|
||||||
|
text: "Main Alias"
|
||||||
|
color: MPalette.lighter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
spacing: 8
|
||||||
|
|
||||||
|
MaterialIcon {
|
||||||
|
Layout.preferredWidth: 32
|
||||||
|
Layout.preferredHeight: 32
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
|
|
||||||
|
icon: "\ue88f"
|
||||||
|
color: MPalette.lighter
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
ColumnLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
wrapMode: Label.Wrap
|
Label {
|
||||||
text: "Topic"
|
Layout.fillWidth: true
|
||||||
color: MPalette.lighter
|
|
||||||
|
wrapMode: Label.Wrap
|
||||||
|
text: room && room.topic ? room.topic : "No Topic"
|
||||||
|
color: MPalette.foreground
|
||||||
|
maximumLineCount: 5
|
||||||
|
elide: Text.ElideRight
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
wrapMode: Label.Wrap
|
||||||
|
text: "Topic"
|
||||||
|
color: MPalette.lighter
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background: RippleEffect {
|
background: AutoMouseArea {
|
||||||
onPrimaryClicked: roomSettingDialog.createObject(ApplicationWindow.overlay, {"room": room}).open()
|
onPrimaryClicked: roomSettingDialog.createObject(ApplicationWindow.overlay, {"room": room}).open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user