29 lines
613 B
QML
29 lines
613 B
QML
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
|
|
}
|
|
}
|