mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-03 10:14:52 +00:00
update: qt6,frontends,qml (4 files)
This commit is contained in:
@@ -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,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
|
||||
|
||||
Reference in New Issue
Block a user