update: qt6,frontends,qml (4 files)

This commit is contained in:
2025-12-26 06:38:33 +00:00
parent 993eab24f9
commit 0e008894f2
4 changed files with 15 additions and 13 deletions
@@ -9,34 +9,34 @@ Rectangle {
property alias text: label.text
property bool outlined: false
property bool elevated: true
property color fillColor: outlined ? "transparent" : MaterialPalette.palette.primary
property color borderColor: outlined ? MaterialPalette.palette.outline : "transparent"
property color textColor: outlined ? MaterialPalette.palette.primary : MaterialPalette.palette.onPrimary
property color fillColor: outlined ? "transparent" : MaterialPalette.primary
property color borderColor: outlined ? MaterialPalette.outline : "transparent"
property color textColor: outlined ? MaterialPalette.primary : MaterialPalette.onPrimary
property bool disabled: false
property real cornerRadius: 12
signal clicked()
implicitHeight: 48
radius: cornerRadius
color: disabled ? MaterialPalette.palette.surfaceVariant : fillColor
border.color: disabled ? MaterialPalette.palette.surfaceVariant : borderColor
color: disabled ? MaterialPalette.surfaceVariant : fillColor
border.color: disabled ? MaterialPalette.surfaceVariant : borderColor
border.width: outlined ? 1 : 0
layer.enabled: elevated && !outlined && !disabled
layer.effect: DropShadow {
anchors.fill: parent
horizontalOffset: 0
verticalOffset: 4
radius: 16
samples: 16
color: "#22000000"
}
radius: 16
samples: 16
color: "#22000000"
}
Text {
id: label
anchors.centerIn: parent
font.pixelSize: 15
font.bold: true
color: disabled ? MaterialPalette.palette.surface : textColor
color: disabled ? MaterialPalette.surface : textColor
}
MouseArea {
@@ -8,13 +8,13 @@ Rectangle {
id: card
property alias contentItem: contentLoader.sourceComponent
property real cornerRadius: 16
property color surfaceColor: MaterialPalette.palette.surface
property color surfaceColor: MaterialPalette.surface
property real elevation: MaterialPalette.palette.elevationLow
width: parent ? parent.width : 320
radius: cornerRadius
color: surfaceColor
border.color: MaterialPalette.palette.outline
border.color: MaterialPalette.outline
border.width: 1
layer.enabled: true
layer.effect: DropShadow {
@@ -1,5 +1,7 @@
import QtQuick 2.15
pragma Singleton
QtObject {
id: palette
+1 -1
View File
@@ -1,5 +1,5 @@
module Material
MaterialPalette 1.0 MaterialPalette.qml
singleton MaterialPalette 1.0 MaterialPalette.qml
MaterialButton 1.0 MaterialButton.qml
MaterialCard 1.0 MaterialCard.qml
MaterialTextField 1.0 MaterialTextField.qml