Refine mobileform settings

Numerous refinements to the new mobileform setting pages 
- Ensure left and right padding at the top level is 0 for mobile
- Centre align the avatar in the account editor page and add tooltip to button
- Fix the bubble/compact mode setting so that it fits when thin, i.e on mobile
- Fix the loading placeholder in device settings
This commit is contained in:
James Graham
2022-11-20 16:30:54 +00:00
parent be86eec99c
commit 869bb5ad87
6 changed files with 35 additions and 7 deletions

View File

@@ -18,6 +18,8 @@ Kirigami.ScrollablePage {
readonly property bool compact: width > Kirigami.Units.gridUnit * 30 ? 2 : 1
leftPadding: 0
rightPadding: 0
ColumnLayout {
MobileForm.FormCard {
Layout.topMargin: Kirigami.Units.largeSpacing
@@ -29,9 +31,14 @@ Kirigami.ScrollablePage {
}
MobileForm.AbstractFormDelegate {
Layout.fillWidth: true
background: Item {}
contentItem: RowLayout {
Item {
Layout.fillWidth: true
}
Kirigami.Avatar {
id: avatar
Layout.alignment: Qt.AlignRight
source: root.connection && root.connection.localUser.avatarMediaId ? ("image://mxc/" + root.connection.localUser.avatarMediaId) : ""
name: root.connection.localUser.displayName ?? root.connection.localUser.id
@@ -60,10 +67,16 @@ Kirigami.ScrollablePage {
}
}
QQC2.Button {
Layout.alignment: Qt.AlignLeft
visible: avatar.source.toString().length !== 0
icon.name: "edit-clear"
text: i18n("Remove current avatar")
display: QQC2.AbstractButton.IconOnly
onClicked: avatar.source = ""
QQC2.ToolTip.text: text
QQC2.ToolTip.visible: hovered
}
Item {
Layout.fillWidth: true