Fix width for messages with text + image previews

The width of the images weren't taken into consideration to calculate
the message xOffset, resulting in these messages being pushed way past
what they should be and looking very thin
This commit is contained in:
miruka 2019-12-19 16:03:00 -04:00
parent be0541f2d9
commit 090c53898c

View File

@ -31,8 +31,16 @@ HRowLayout {
readonly property int xOffset:
onRight ?
contentLabel.width - contentLabel.paintedWidth -
contentLabel.leftPadding - contentLabel.rightPadding :
Math.min(
contentColumn.width - contentLabel.paintedWidth -
contentLabel.leftPadding - contentLabel.rightPadding,
contentColumn.width - linksRepeater.widestChild -
(
pureMedia ?
0 : contentLabel.leftPadding + contentLabel.rightPadding
),
) :
0
// 600px max with a 16px font