fix(StatusMessage): stickers were not aligned correctly

Closes #8944
This commit is contained in:
Alexandra Betouni 2023-01-12 14:19:36 +02:00 committed by Jonathan Rainville
parent 763041dab5
commit 0fb954b640
3 changed files with 11 additions and 5 deletions

View File

@ -140,10 +140,9 @@ Control {
contentItem: Item {
implicitWidth: messageLayout.implicitWidth
implicitWidth: parent.width
implicitHeight: messageLayout.implicitHeight
SequentialAnimation {
id: messageFoundAnimation
@ -182,7 +181,8 @@ Control {
ColumnLayout {
id: messageLayout
anchors.fill: parent
width: parent.width
height: childrenRect.height
spacing: 2
Loader {
@ -202,6 +202,7 @@ Control {
Layout.fillWidth: true
Layout.leftMargin: 16
Layout.rightMargin: 16
Layout.preferredHeight: childrenRect.height
spacing: 8
StatusSmartIdenticon {
@ -226,6 +227,7 @@ Control {
spacing: 2
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
Layout.preferredHeight: childrenRect.height
Layout.leftMargin: profileImage.visible ? 0 : root.messageDetails.sender.profileImage.assetSettings.width + parent.spacing
StatusPinMessageDetails {
@ -253,7 +255,9 @@ Control {
}
Loader {
Layout.fillWidth: true
active: !root.editMode && !!root.messageDetails.messageText && !root.hideMessage
active: (!root.editMode && !!root.messageDetails.messageText && !root.hideMessage
&& ((root.messageDetails.contentType === StatusMessage.ContentType.Text)
|| (root.messageDetails.contentType === StatusMessage.ContentType.Emoji)))
visible: active
sourceComponent: StatusTextMessage {
objectName: "StatusMessage_textMessage"

View File

@ -363,6 +363,8 @@ Loader {
StatusMessage {
id: delegate
Layout.fillWidth: true
Layout.topMargin: 2
Layout.bottomMargin: 2
function convertContentType(value) {
switch (value) {