@@ -23,10 +23,10 @@ Rectangle {
23 property int keyboardSize: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
23 property int keyboardSize: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0
24 property var previewData
24 property var previewData
26− property string title: ""
27 property real previewWidthRatio: 0.5
26 property real previewWidthRatio: 0.5
29 property Component header
28 property Component header
29+ property Component title
30 property Component buttons
30 property Component buttons
31 property Component body
31 property Component body
@@ -62,64 +62,39 @@ Rectangle {
65− id: headerRow
65+ id: headerIcon
69 left: parent.left
67 left: parent.left
70 right: parent.right
68 right: parent.right
70+ leftMargin: root.contentSpacing
71+ topMargin: root.contentSpacing
71− margins: root.contentSpacing
72+ rightMargin: root.contentSpacing
73−
74+ height: childrenRect.height
74− MouseArea {
75+ Loader {
75− anchors {
76+ id: headerLoader
76− fill: parent
77+ anchors.left: parent.left
77− leftMargin: -root.contentSpacing
78+ anchors.right: parent.right
78− rightMargin: -root.contentSpacing
79+ sourceComponent: root.header
79− topMargin: -root.contentSpacing
82− onClicked: root.close();
86− id: labelItem
84+ id: headerRow
85+ height: childrenRect.height
87− anchors {
86+ anchors {
87+ top: headerIcon.bottom
88− fill: parent
89+ right: parent.right
89− rightMargin: closePreviewImage.width + spacing
90+ leftMargin: root.contentSpacing
91+ rightMargin: root.contentSpacing
92− property int spacing: units.gu(2)
94+ id: titleLoader
96− objectName: "titleLabel"
98− left: parent.left
95+ anchors.left: parent.left
99− right: parent.right
96+ anchors.right: parent.right
102− elide: Text.ElideRight
104− font.weight: Font.Light
105− color: Theme.palette.selected.backgroundText
107− text: root.title
97+ sourceComponent: root.title
112− id: closePreviewImage
113− source: "graphics/tablet/icon_close_preview.png"
115− height: units.gu(1.5)
117− bottom: title.bottom
118− bottomMargin: units.dp(7)
120− leftMargin: title.paintedWidth + labelItem.spacing
@@ -157,12 +132,6 @@ Rectangle {
157 height: childrenRect.height
132 height: childrenRect.height
158 spacing: units.gu(1)
133 spacing: units.gu(1)
162− anchors.left: parent.left
163− anchors.right: parent.right
164− sourceComponent: root.header
167 id: buttonLoader
136 id: buttonLoader
168 anchors.left: parent.left
137 anchors.left: parent.left