update: qt6,qml,frontends (3 files)

This commit is contained in:
2025-12-26 06:50:10 +00:00
parent 6f5baf9d7c
commit 1c1e57a27e
3 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import QtQuick 2.15
import "MaterialPalette.qml" as MaterialPalette
Text {
id: link
property alias url: mouseArea.url
property string href: ""
property color hoverColor: MaterialPalette.primary
color: MaterialPalette.primary
font.pixelSize: 14
font.bold: false
textDecoration: "underline"
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onEntered: link.color = hoverColor
onExited: link.color = MaterialPalette.primary
onClicked: {
if (href.length > 0) Qt.openUrlExternally(href)
}
}
}

View File

@@ -0,0 +1,14 @@
import QtQuick 2.15
import "MaterialSurface.qml" as Surface
Surface.MaterialSurface {
id: paper
property alias content: paperLoader.sourceComponent
Loader {
id: paperLoader
anchors.fill: parent
anchors.margins: 12
sourceComponent: content
}
}

View File

@@ -0,0 +1,18 @@
import QtQuick 2.15
import "MaterialPalette.qml" as MaterialPalette
Text {
id: typ
property alias content: text
property string variant: "body1"
color: MaterialPalette.onSurface
font.pixelSize: variant === "h1" ? 32 :
variant === "h2" ? 28 :
variant === "h3" ? 24 :
variant === "h4" ? 20 :
variant === "button" ? 16 :
14
font.bold: variant === "h1" || variant === "h2" || variant === "h3"
}