Merge pull request 'Change the deprecated SilicaWebView to the new WebView' (#1) from fix-silicawebview-component into main

Reviewed-on: https://codeberg.org/kirbylife/harbour-wallaread/pulls/1
pull/4/head
kirbylife 2024-03-26 07:30:57 +00:00
commit cde95f63d6
1 changed files with 9 additions and 2 deletions

View File

@ -21,6 +21,9 @@
import QtQuick 2.0 import QtQuick 2.0
import Sailfish.Silica 1.0 import Sailfish.Silica 1.0
import Sailfish.WebView 1.0
import Sailfish.WebEngine 1.0
import Sailfish.WebView.Popups 1.0
Page { Page {
id: articlePage id: articlePage
@ -29,7 +32,7 @@ Page {
property string title property string title
property string content property string content
SilicaWebView { WebView {
id: webview id: webview
anchors.fill: parent anchors.fill: parent
@ -42,9 +45,13 @@ Page {
var html = var html =
"<html>" + "<html>" +
"<head>" + "<head>" +
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">" +
"<style type=\"text/css\">" + "<style type=\"text/css\">" +
"article { font-family: sans-serif; font-size: 16px; }" + "article { font-family: sans-serif; font-size: 16px; }" +
"article h1 { font-size: 32px; }" + "article h1 { font-size: 25px; }" +
"img { max-width: 100%; height: auto; }" +
"pre { word-wrap: normal; overflow-x: auto }" +
"code { word-wrap: normal; overflow-x: auto }" +
"</style>" + "</style>" +
"</head>" + "</head>" +
"<body>" + "<body>" +