mirror of https://github.com/KDE/kasts.git
Use WebView's scrolling for now
This commit is contained in:
parent
4f7af0f2ff
commit
7ffcae3dd2
|
@ -27,26 +27,21 @@ import org.kde.kirigami 2.12 as Kirigami
|
||||||
|
|
||||||
import org.kde.alligator 1.0
|
import org.kde.alligator 1.0
|
||||||
|
|
||||||
Kirigami.ScrollablePage {
|
Kirigami.Page {
|
||||||
id: page
|
id: page
|
||||||
|
|
||||||
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 + "; 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
|
title: entry.title
|
||||||
|
|
||||||
WebView {
|
WebView {
|
||||||
id: webView
|
id: webView
|
||||||
width: page.width
|
anchors.fill: parent
|
||||||
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
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue