import QtQuick import QtQuick.Layouts import "../../theme" // Titled card grouping related settings. `padded` suits free-form content // (buttons, notes, previews); rows carry their own padding. ColumnLayout { id: root property string title property string description property bool padded: false default property alias content: body.data Layout.fillWidth: true spacing: 8 ColumnLayout { visible: root.title !== "" || root.description !== "" Layout.fillWidth: true Layout.leftMargin: 4 spacing: 2 Text { text: root.title visible: text !== "" color: Theme.text font.pixelSize: 14 font.weight: Font.DemiBold Layout.fillWidth: true } Text { text: root.description visible: text !== "" color: Theme.textSecondary font.pixelSize: 11 wrapMode: Text.Wrap Layout.fillWidth: true } } Rectangle { Layout.fillWidth: true implicitHeight: body.implicitHeight + (root.padded ? 28 : 8) radius: Math.max(10, Theme.radius * 0.7) color: Theme.fill border.width: 1 border.color: Theme.hairline ColumnLayout { id: body anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top anchors.margins: root.padded ? 14 : 4 spacing: root.padded ? 10 : 2 } } }