mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 06:14:59 +00:00
update: qt6,qml,frontends (3 files)
This commit is contained in:
25
frontends/qt6/qmllib/Material/MaterialLink.qml
Normal file
25
frontends/qt6/qmllib/Material/MaterialLink.qml
Normal 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)
|
||||
}
|
||||
}
|
||||
}
|
||||
14
frontends/qt6/qmllib/Material/MaterialPaper.qml
Normal file
14
frontends/qt6/qmllib/Material/MaterialPaper.qml
Normal 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
|
||||
}
|
||||
}
|
||||
18
frontends/qt6/qmllib/Material/MaterialTypography.qml
Normal file
18
frontends/qt6/qmllib/Material/MaterialTypography.qml
Normal 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"
|
||||
}
|
||||
Reference in New Issue
Block a user