18 import Ubuntu.Components 0.1
30 height: childrenRect.height
34 objectName:
"innerPreviewHeader"
35 readonly
property url mascot: root.widgetData[
"mascot"] ||
""
36 readonly
property string title: root.widgetData[
"title"] ||
""
37 readonly
property string subtitle: root.widgetData[
"subtitle"] ||
""
38 readonly
property color fontColor:
"grey"
40 implicitHeight: row.height + row.margins * 2
45 objectName:
"outerRow"
47 property real margins: units.gu(1)
49 spacing: mascotShapeLoader.active ? margins : 0
51 top: parent.top; left: parent.left; right: parent.right
60 anchors.verticalCenter: parent.verticalCenter
63 height: units.gu(5.625)
64 readonly
property int maxSize: Math.max(width, height) * 4
67 sourceComponent: UbuntuShape {
68 objectName:
"mascotShape"
69 visible: image.status === Image.Ready
71 source: headerRoot.mascot
72 width: source ? mascotShapeLoader.width : 0
73 height: mascotShapeLoader.height
75 sourceSize { width: mascotShapeLoader.maxSize; height: mascotShapeLoader.maxSize }
76 fillMode: Image.PreserveAspectCrop
77 horizontalAlignment: Image.AlignHCenter
78 verticalAlignment: Image.AlignVCenter
85 width: parent.width - x
87 anchors.verticalCenter: parent.verticalCenter
91 objectName:
"titleLabel"
92 anchors { left: parent.left; right: parent.right }
93 elide: Text.ElideRight
94 font.weight: Font.Normal
98 color: headerRoot.fontColor
99 text: headerRoot.title
103 active: titleLabel.text && headerRoot.subtitle
104 anchors { left: parent.left; right: parent.right }
105 sourceComponent: Label {
107 objectName:
"subtitleLabel"
108 elide: Text.ElideRight
110 font.weight: Font.Light
111 color: headerRoot.fontColor
112 text: headerRoot.subtitle