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

View File

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

View File

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

View File

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