2021-09-10 12:45:15 +02:00
|
|
|
import QtQuick
|
|
|
|
import QtWebEngine
|
2022-05-05 13:02:54 +02:00
|
|
|
import ScreenPlayWallpaper
|
2020-12-28 17:26:56 +01:00
|
|
|
|
|
|
|
Item {
|
|
|
|
id: root
|
2021-05-16 19:37:55 +02:00
|
|
|
|
2021-01-23 11:34:46 +01:00
|
|
|
property string url
|
2020-12-28 17:26:56 +01:00
|
|
|
|
|
|
|
Component.onCompleted: {
|
2021-05-16 19:37:55 +02:00
|
|
|
WebEngine.settings.localContentCanAccessFileUrls = true;
|
|
|
|
WebEngine.settings.localContentCanAccessRemoteUrls = true;
|
|
|
|
WebEngine.settings.allowRunningInsecureContent = true;
|
|
|
|
WebEngine.settings.accelerated2dCanvasEnabled = true;
|
|
|
|
WebEngine.settings.javascriptCanOpenWindows = false;
|
|
|
|
WebEngine.settings.showScrollBars = false;
|
|
|
|
WebEngine.settings.playbackRequiresUserGesture = false;
|
|
|
|
WebEngine.settings.focusOnNavigationEnabled = true;
|
2020-12-28 17:26:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
WebEngineView {
|
|
|
|
id: webView
|
2021-05-16 19:37:55 +02:00
|
|
|
|
2020-12-28 17:26:56 +01:00
|
|
|
anchors.fill: parent
|
2021-11-12 14:56:22 +01:00
|
|
|
url: Qt.resolvedUrl(root.url)
|
2020-12-28 17:26:56 +01:00
|
|
|
onJavaScriptConsoleMessage: print(lineNumber, message)
|
|
|
|
onLoadProgressChanged: {
|
2023-02-03 17:03:10 +01:00
|
|
|
if (loadProgress === 100)
|
2023-06-11 10:07:39 +02:00
|
|
|
Wallpaper.requestFadeIn();
|
2020-12-28 17:26:56 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|