feat: add card
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls.Basic
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
property real padding: 10
|
||||||
|
|
||||||
|
// Automatically size based on content plus padding
|
||||||
|
implicitWidth: contentItem.childrenRect.width + padding * 2
|
||||||
|
implicitHeight: contentItem.childrenRect.height + padding * 2
|
||||||
|
|
||||||
|
// Background
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
color: Theme.card
|
||||||
|
radius: Theme.radius
|
||||||
|
}
|
||||||
|
|
||||||
|
// This allows direct assignment of children to AppCard
|
||||||
|
default property alias content: contentItem.children
|
||||||
|
// Content container
|
||||||
|
Item {
|
||||||
|
id: contentItem
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: padding
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@ set(plain_qml_files
|
|||||||
AppText.qml
|
AppText.qml
|
||||||
AppIcon.qml
|
AppIcon.qml
|
||||||
AppPrimaryButton.qml
|
AppPrimaryButton.qml
|
||||||
|
AppCard.qml
|
||||||
)
|
)
|
||||||
set(qml_singletons
|
set(qml_singletons
|
||||||
Fonts.qml
|
Fonts.qml
|
||||||
|
|||||||
Reference in New Issue
Block a user