Resize avatar in timeline.
This commit is contained in:
parent
7557f785f5
commit
5700c967ae
|
@ -46,8 +46,8 @@ ColumnLayout {
|
||||||
spacing: 4
|
spacing: 4
|
||||||
|
|
||||||
Avatar {
|
Avatar {
|
||||||
Layout.preferredWidth: 32
|
Layout.preferredWidth: 36
|
||||||
Layout.preferredHeight: 32
|
Layout.preferredHeight: 36
|
||||||
Layout.alignment: Qt.AlignTop
|
Layout.alignment: Qt.AlignTop
|
||||||
|
|
||||||
visible: avatarVisible
|
visible: avatarVisible
|
||||||
|
@ -70,22 +70,14 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.preferredWidth: 32
|
Layout.preferredWidth: 36
|
||||||
Layout.preferredHeight: 32
|
Layout.preferredHeight: 36
|
||||||
Layout.alignment: Qt.AlignTop
|
|
||||||
|
|
||||||
visible: !(sentByMe || avatarVisible)
|
visible: !(sentByMe || avatarVisible)
|
||||||
|
|
||||||
text: Qt.formatTime(time, "hh:mm AP")
|
|
||||||
color: "#5B7480"
|
|
||||||
|
|
||||||
font.pixelSize: 10
|
|
||||||
horizontalAlignment: Label.AlignHCenter
|
|
||||||
verticalAlignment: Label.AlignVCenter
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Control {
|
Control {
|
||||||
Layout.maximumWidth: messageListView.width - (!sentByMe ? 32 + messageRow.spacing : 0) - 48
|
Layout.maximumWidth: messageListView.width - (!sentByMe ? 36 + messageRow.spacing : 0) - 48
|
||||||
|
|
||||||
padding: 12
|
padding: 12
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@ RowLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
Avatar {
|
Avatar {
|
||||||
Layout.preferredWidth: 32
|
Layout.preferredWidth: 36
|
||||||
Layout.preferredHeight: 32
|
Layout.preferredHeight: 36
|
||||||
Layout.alignment: Qt.AlignBottom
|
Layout.alignment: Qt.AlignBottom
|
||||||
|
|
||||||
visible: avatarVisible
|
visible: avatarVisible
|
||||||
|
@ -59,8 +59,8 @@ RowLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.preferredWidth: 32
|
Layout.preferredWidth: 36
|
||||||
Layout.preferredHeight: 32
|
Layout.preferredHeight: 36
|
||||||
|
|
||||||
visible: !(sentByMe || avatarVisible)
|
visible: !(sentByMe || avatarVisible)
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ RowLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
Layout.maximumWidth: messageListView.width - (!sentByMe ? 32 + root.spacing : 0) - 48
|
Layout.maximumWidth: messageListView.width - (!sentByMe ? 36 + root.spacing : 0) - 48
|
||||||
|
|
||||||
id: img
|
id: img
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,8 @@ ColumnLayout {
|
||||||
spacing: 4
|
spacing: 4
|
||||||
|
|
||||||
Avatar {
|
Avatar {
|
||||||
Layout.preferredWidth: 32
|
Layout.preferredWidth: 36
|
||||||
Layout.preferredHeight: 32
|
Layout.preferredHeight: 36
|
||||||
Layout.alignment: Qt.AlignBottom
|
Layout.alignment: Qt.AlignBottom
|
||||||
|
|
||||||
visible: avatarVisible
|
visible: avatarVisible
|
||||||
|
@ -58,14 +58,14 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
Layout.preferredWidth: 32
|
Layout.preferredWidth: 36
|
||||||
Layout.preferredHeight: 32
|
Layout.preferredHeight: 36
|
||||||
|
|
||||||
visible: !(sentByMe || avatarVisible)
|
visible: !(sentByMe || avatarVisible)
|
||||||
}
|
}
|
||||||
|
|
||||||
Control {
|
Control {
|
||||||
Layout.maximumWidth: messageListView.width - (!sentByMe ? 32 + messageRow.spacing : 0) - 48
|
Layout.maximumWidth: messageListView.width - (!sentByMe ? 36 + messageRow.spacing : 0) - 48
|
||||||
|
|
||||||
verticalPadding: 8
|
verticalPadding: 8
|
||||||
horizontalPadding: 16
|
horizontalPadding: 16
|
||||||
|
@ -259,7 +259,7 @@ ColumnLayout {
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.alignment: sentByMe ? Qt.AlignRight : Qt.AlignLeft
|
Layout.alignment: sentByMe ? Qt.AlignRight : Qt.AlignLeft
|
||||||
Layout.leftMargin: sentByMe ? undefined : 32 + messageRow.spacing + 12
|
Layout.leftMargin: sentByMe ? undefined : 36 + messageRow.spacing + 12
|
||||||
Layout.rightMargin: sentByMe ? 12 : undefined
|
Layout.rightMargin: sentByMe ? 12 : undefined
|
||||||
Layout.bottomMargin: 4
|
Layout.bottomMargin: 4
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue