Simplify layout

This commit is contained in:
Carl Schwan
2020-11-19 09:26:01 +01:00
parent 011fc052f4
commit f4f0211383

View File

@@ -71,22 +71,25 @@ Kirigami.OverlayDrawer {
wrapMode: Label.Wrap wrapMode: Label.Wrap
text: room ? room.displayName : i18n("No name") text: room ? room.displayName : i18n("No name")
} }
Label {
Flow {
Layout.fillWidth: true Layout.fillWidth: true
Label { text: room && room.canonicalAlias ? room.canonicalAlias : i18n("No Canonical Alias")
text: room ? i18np("%1 Member", "%1 Members", room.totalMemberCount) : i18n("No Member Count") }
color: Kirigami.Theme.disabledTextColor
height: configButton.implicitHeight Label {
} Layout.fillWidth: true
Button { text: room ? i18np("%1 Member", "%1 Members", room.totalMemberCount) : i18n("No Member Count")
id: configButton color: Kirigami.Theme.disabledTextColor
icon.name: 'settings-configure' height: configButton.implicitHeight
text: i18n("Room setting") }
onClicked: { Button {
roomSettingDialog.createObject(ApplicationWindow.overlay, {"room": room}).open() Layout.fillWidth: true
roomDrawer.close(); id: configButton
} icon.name: 'settings-configure'
text: i18n("Room setting")
onClicked: {
roomSettingDialog.createObject(ApplicationWindow.overlay, {"room": room}).open()
roomDrawer.close();
} }
} }
} }
@@ -96,20 +99,13 @@ Kirigami.OverlayDrawer {
Layout.fillWidth: true Layout.fillWidth: true
} }
Kirigami.FormLayout { Label {
Layout.fillWidth: true
Layout.maximumWidth: Kirigami.Units.gridUnit * 20 Layout.maximumWidth: Kirigami.Units.gridUnit * 20
Label { Layout.fillWidth: true
Kirigami.FormData.label: i18n("Main Alias:") Kirigami.FormData.label: i18n("Topic:")
text: room && room.canonicalAlias ? room.canonicalAlias :i18n("No Canonical Alias") text: room && room.topic ? room.topic : i18n("No Topic")
} elide: Text.ElideRight
Label { wrapMode: Text.WordWrap
Layout.fillWidth: true
Kirigami.FormData.label: i18n("Topic:")
text: room && room.topic ? room.topic : i18n("No Topic")
elide: Text.ElideRight
wrapMode: Text.WordWrap
}
} }
RowLayout { RowLayout {