Improve icon sizing and margins on mobile

This commit is contained in:
Carl Schwan
2020-11-15 22:02:56 +01:00
parent 32ea887de6
commit 41b81dd744
4 changed files with 12 additions and 13 deletions

View File

@@ -39,10 +39,10 @@ RowLayout {
Layout.topMargin: showAuthor ? Kirigami.Units.smallSpacing : 0
Kirigami.Avatar {
Layout.minimumWidth: Kirigami.Units.iconSizes.medium
Layout.minimumHeight: Kirigami.Units.iconSizes.medium
Layout.maximumWidth: Kirigami.Units.iconSizes.medium
Layout.maximumHeight: Kirigami.Units.iconSizes.medium
Layout.minimumWidth: Kirigami.Units.gridUnit * 2
Layout.minimumHeight: Kirigami.Units.gridUnit * 2
Layout.maximumWidth: Kirigami.Units.gridUnit * 2
Layout.maximumHeight: Kirigami.Units.gridUnit * 2
Layout.alignment: Qt.AlignTop
@@ -64,7 +64,7 @@ RowLayout {
}
Item {
Layout.minimumWidth: Kirigami.Units.iconSizes.medium
Layout.minimumWidth: Kirigami.Units.gridUnit * 2
Layout.preferredHeight: 1
visible: !showAuthor
}

View File

@@ -22,8 +22,8 @@ RowLayout {
}
Kirigami.Avatar {
Layout.preferredWidth: Kirigami.Units.iconSizes.smallMedium
Layout.preferredHeight: Kirigami.Units.iconSizes.smallMedium
Layout.preferredWidth: Kirigami.Units.gridUnit
Layout.preferredHeight: Kirigami.Units.gridUnit
Layout.alignment: Qt.AlignTop
source: replyVisible && reply.author.avatarMediaId ? "image://mxc/" + reply.author.avatarMediaId : ""
@@ -32,21 +32,21 @@ RowLayout {
}
ColumnLayout {
id: replyLayout
Layout.fillWidth: true
QQC2.Label {
Layout.fillWidth: true
text: replyVisible ? reply.author.displayName : ""
color: replyVisible ? reply.author.color: null
wrapMode: Text.Wrap
elide: Text.ElideRight
}
QQC2.Label {
Layout.fillWidth: true
text: replyVisible ? reply.display : ""
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
textFormat: Text.RichText
elide: Text.ElideRight
}
}
}

View File

@@ -16,8 +16,6 @@ Item {
ColumnLayout {
id: column
x: horizontalPadding
width: parent.width - Kirigami.Units.largeSpacing * 2
SectionDelegate {
Layout.maximumWidth: parent.width

View File

@@ -200,11 +200,12 @@ Kirigami.ScrollablePage {
innerObject: [
TextDelegate {
Layout.fillWidth: true
Layout.rightMargin: Kirigami.Units.largeSpacing
},
ReactionDelegate {
Layout.fillWidth: true
Layout.topMargin: 0
Layout.bottomMargin: 8
Layout.bottomMargin: Kirigami.Units.largeSpacing * 2
}
]
}