From 07b2b9b70a9c164f1f97e7552813fc4bcf853163 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Tue, 2 Jun 2020 16:42:16 +0200 Subject: [PATCH] Some fixes for Entry Rendering --- src/qml/EntryPage.qml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/qml/EntryPage.qml b/src/qml/EntryPage.qml index 1379dbde..3d03fce8 100644 --- a/src/qml/EntryPage.qml +++ b/src/qml/EntryPage.qml @@ -32,17 +32,21 @@ Kirigami.ScrollablePage { property QtObject entry - property var content: "" + page.entry.content + ""; + property var content: "" + page.entry.content + ""; title: entry.title - Flickable { - WebView { - width: page.width - height: page.height - 20 - Component.onCompleted: { - loadHtml(page.content, page.entry.baseUrl) - } + WebView { + id: webView + width: page.width + Component.onCompleted: { + loadHtml(page.content, page.entry.baseUrl) + } + onLoadingChanged: { + runJavaScript("document.documentElement.scrollHeight", function(result) { + webView.height = result * 1.025 + }) } } } + \ No newline at end of file