Use WebView's scrolling for now

This commit is contained in:
Tobias Fella 2020-06-02 17:22:54 +02:00
parent 4f7af0f2ff
commit 7ffcae3dd2
1 changed files with 3 additions and 8 deletions

View File

@ -27,26 +27,21 @@ import org.kde.kirigami 2.12 as Kirigami
import org.kde.alligator 1.0
Kirigami.ScrollablePage {
Kirigami.Page {
id: page
property QtObject entry
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>";
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>";
title: entry.title
WebView {
id: webView
width: page.width
anchors.fill: parent
Component.onCompleted: {
loadHtml(page.content, page.entry.baseUrl)
}
onLoadingChanged: {
runJavaScript("document.documentElement.scrollHeight", function(result) {
webView.height = result * 1.025
})
}
}
}