@@ -23,10 +23,10 @@ Rectangle {
2323 property int keyboardSize: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
2424 property var previewData
2525
26− property string title: ""
2726 property real previewWidthRatio: 0.5
2827
2928 property Component header
29+ property Component title
3030 property Component buttons
3131 property Component body
3232
@@ -62,64 +62,39 @@ Rectangle {
6262 }
6363
6464 Item {
65− id: headerRow
66− height: units.gu(4)
65+ id: headerIcon
6766 anchors {
68− top: parent.top
6967 left: parent.left
7068 right: parent.right
71− margins: root.contentSpacing
69+ top: parent.top
70+ leftMargin: root.contentSpacing
71+ topMargin: root.contentSpacing
72+ rightMargin: root.contentSpacing
7273 }
73−
74− MouseArea {
75− anchors {
76− fill: parent
77− leftMargin: -root.contentSpacing
78− rightMargin: -root.contentSpacing
79− topMargin: -root.contentSpacing
80− }
81−
82− onClicked: root.close();
74+ height: childrenRect.height
75+ Loader {
76+ id: headerLoader
77+ anchors.left: parent.left
78+ anchors.right: parent.right
79+ sourceComponent: root.header
8380 }
81+ }
8482
85− Item {
86− id: labelItem
87− anchors {
88− fill: parent
89− rightMargin: closePreviewImage.width + spacing
90− }
91−
92− property int spacing: units.gu(2)
93−
94− Label {
95− id: title
96− objectName: "titleLabel"
97− anchors {
98− left: parent.left
99− right: parent.right
100− }
101−
102− elide: Text.ElideRight
103− fontSize: "x-large"
104− font.weight: Font.Light
105− color: Theme.palette.selected.backgroundText
106− opacity: 0.9
107− text: root.title
108− style: Text.Raised
109− styleColor: "black"
110− }
111− Image {
112− id: closePreviewImage
113− source: "graphics/tablet/icon_close_preview.png"
114− width: units.gu(4)
115− height: units.gu(1.5)
116− anchors {
117− bottom: title.bottom
118− bottomMargin: units.dp(7)
119− left: parent.left
120− leftMargin: title.paintedWidth + labelItem.spacing
121− }
122− }
83+ Item {
84+ id: headerRow
85+ height: childrenRect.height
86+ anchors {
87+ top: headerIcon.bottom
88+ left: parent.left
89+ right: parent.right
90+ leftMargin: root.contentSpacing
91+ rightMargin: root.contentSpacing
92+ }
93+ Loader {
94+ id: titleLoader
95+ anchors.left: parent.left
96+ anchors.right: parent.right
97+ sourceComponent: root.title
12398 }
12499 }
125100
@@ -157,12 +132,6 @@ Rectangle {
157132 height: childrenRect.height
158133 spacing: units.gu(1)
159134
160− Loader {
161− id: headerLoader
162− anchors.left: parent.left
163− anchors.right: parent.right
164− sourceComponent: root.header
165− }
166135 Loader {
167136 id: buttonLoader
168137 anchors.left: parent.left