Some fixes for Entry Rendering

This commit is contained in:
Tobias Fella 2020-06-02 16:42:16 +02:00
parent 2aa1252abf
commit 07b2b9b70a
1 changed files with 12 additions and 8 deletions

View File

@ -32,17 +32,21 @@ Kirigami.ScrollablePage {
property QtObject entry property QtObject entry
property var content: "<style> img { max-width: 100%; } body { background: " + Kirigami.Theme.backgroundColor + "; font-family: " + Kirigami.Theme.defaultFont.family + "; }</style><body>" + page.entry.content + "</body>"; property var content: "<style> img { max-width: 100%; } body { background: " + Kirigami.Theme.backgroundColor + "; font-family: " + Kirigami.Theme.defaultFont.family + "; overflow: hidden } </style><body>" + page.entry.content + "</body>";
title: entry.title title: entry.title
Flickable { WebView {
WebView { id: webView
width: page.width width: page.width
height: page.height - 20 Component.onCompleted: {
Component.onCompleted: { loadHtml(page.content, page.entry.baseUrl)
loadHtml(page.content, page.entry.baseUrl) }
} onLoadingChanged: {
runJavaScript("document.documentElement.scrollHeight", function(result) {
webView.height = result * 1.025
})
} }
} }
} }