Initial commit

This commit is contained in:
Niels
2025-06-17 21:25:16 +02:00
commit e7a07a37b5
20 changed files with 900 additions and 0 deletions
+65
View File
@@ -0,0 +1,65 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import Sailfish.WebView 1.0
WebViewPage {
id: webViewPage
allowedOrientations: Orientation.Portrait | Orientation.Landscape
property string webPageAddress: ""
property string webTitle: ""
property bool webViewLoading: false
property int webViewLoadProgress: 0
Splash {
id: splashItem
visible: running
}
WebView {
id: webView
visible: !splashItem.running
anchors.fill: parent
active: true
url: webPageAddress
onLoadingChanged: {
webViewPage.webViewLoading = loading
webViewPage.webViewLoadProgress = 0
}
onLoadProgressChanged: {
webViewPage.webViewLoadProgress = loadProgress
}
}
Rectangle {
id: panel
color: Theme.highlightDimmerColor
anchors {
bottom: parent.bottom
left: parent.left
right: parent.right
//margins: Theme.padding
}
width: parent.width
height: opacity === 0.0 ? 0 : Theme.paddingSmall / 3
radius: 5
opacity: (webViewPage.webViewLoading || loadStatusShowTimer.running) ? 0.75 : 0.0
Behavior on opacity { FadeAnimator {} }
Timer {
id: loadStatusShowTimer
}
Rectangle {
anchors.left: parent.left
color: Theme.secondaryHighlightColor
width: webViewPage.webViewLoading ? parent.width * (webViewPage.webViewLoadProgress / 100) : 0
height: parent.height
}
}
}