Web page preview changes height a little more dynamically

This commit is contained in:
Sebastian J. Wolf 2020-10-13 21:37:06 +02:00
parent 9042cad448
commit bfba8acc2d
2 changed files with 7 additions and 1 deletions

View file

@ -27,6 +27,7 @@ Row {
id: inReplyToRow
spacing: Theme.paddingSmall
width: parent.width
height: inReplyToMessageColumn.height
property string myUserId;
property variant inReplyToMessage;

View file

@ -718,12 +718,17 @@ Page {
active: false
asynchronous: true
width: parent.width
height: messageListItem.containsWebPage ? ( item ? item.height : ( (parent.width * 2 / 3) + (6 * Theme.fontSizeExtraSmall) + ( 7 * Theme.paddingSmall) ) ) : 0
height: messageListItem.containsWebPage ? ( (parent.width * 2 / 3) + (6 * Theme.fontSizeExtraSmall) + ( 7 * Theme.paddingSmall) ) : 0
sourceComponent: Component {
id: webPagePreviewComponent
WebPagePreview {
id: webPagePreview
onImplicitHeightChanged: {
webPagePreviewLoader.height = webPagePreview.implicitHeight;
}
webPageData: messageListItem.containsWebPage ? display.content.web_page : ""
width: parent.width
}