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 id: inReplyToRow
spacing: Theme.paddingSmall spacing: Theme.paddingSmall
width: parent.width width: parent.width
height: inReplyToMessageColumn.height
property string myUserId; property string myUserId;
property variant inReplyToMessage; property variant inReplyToMessage;

View file

@ -718,12 +718,17 @@ Page {
active: false active: false
asynchronous: true asynchronous: true
width: parent.width 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 { sourceComponent: Component {
id: webPagePreviewComponent id: webPagePreviewComponent
WebPagePreview { WebPagePreview {
id: webPagePreview id: webPagePreview
onImplicitHeightChanged: {
webPagePreviewLoader.height = webPagePreview.implicitHeight;
}
webPageData: messageListItem.containsWebPage ? display.content.web_page : "" webPageData: messageListItem.containsWebPage ? display.content.web_page : ""
width: parent.width width: parent.width
} }