@@ -16,12 +16,14 @@
1616
1717import QtQuick 2.0
1818import Ubuntu.Components 0.1
19+import Dash 0.1
1920import "../"
2021
2122/*! This preview widget shows a header
2223 * The title comes in widgetData["title"]
2324 * The mascot comes in widgetData["mascot"]
2425 * The subtitle comes in widgetData["subtitle"]
26+ * The attributes comes in widgetData["attributes"]
2527 */
2628
2729PreviewWidget {
@@ -35,6 +37,7 @@ PreviewWidget {
3537 readonly property url mascot: root.widgetData["mascot"] || ""
3638 readonly property string title: root.widgetData["title"] || ""
3739 readonly property string subtitle: root.widgetData["subtitle"] || ""
40+ readonly property var attributes: root.widgetData["attributes"] || null
3841 readonly property color fontColor: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
3942
4043 implicitHeight: row.height + row.margins * 2
@@ -114,6 +117,16 @@ PreviewWidget {
114117 text: headerRoot.subtitle
115118 }
116119 }
120+
121+ Loader {
122+ active: titleLabel.text && headerRoot.attributes
123+ anchors { left: parent.left; right: parent.right }
124+ sourceComponent: CardAttributes {
125+ id: previewAttributes
126+ objectName: "previewAttributes"
127+ model: headerRoot.attributes
128+ }
129+ }
117130 }
118131 }
119132 }