2
* Copyright 2013 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
* Renato Araujo Oliveira Filho <renato@canonical.com>
18
* Olivier Tilloy <olivier.tilloy@canonical.com>
22
import Ubuntu.Components 0.1
27
property alias avatar: avatarImage.source
28
property alias icon: iconImage.source
29
property alias appIcon: appIconImage.source
30
property alias titleText: __titleText
31
property alias subtitleText: __subtitleText
32
property alias bodyText: __bodyText
33
property real bodyBottom: bodyText.y + bodyText.height
35
signal appIconClicked()
40
id: avatarImageContainer
43
topMargin: units.gu(2)
45
leftMargin: units.gu(2)
52
fillMode: Image.PreserveAspectFit
61
topMargin: units.gu(2)
62
left: avatarImageContainer.right
63
leftMargin: units.gu(1)
67
horizontalAlignment: Image.AlignHCenter
68
verticalAlignment: Image.AlignBottom
69
fillMode: Image.PreserveAspectFit
76
baseline: iconImage.bottom
78
leftMargin: units.gu(1)
80
rightMargin: units.gu(2)
82
elide: Text.ElideRight
83
font.weight: Font.DemiBold
89
objectName: "subtitle"
91
baseline: __titleText.baseline
92
baselineOffset: units.gu(2.5)
93
left: __titleText.left
94
right: __titleText.right
96
elide: Text.ElideRight
104
baseline: __subtitleText.baseline
105
baselineOffset: units.gu(2.5)
106
left: __titleText.left
108
rightMargin: units.gu(2)
111
wrapMode: Text.WordWrap
112
elide: Text.ElideRight
125
enabled: heroMessageHeader.state === "expanded"
129
objectName: "appIcon"
133
leftMargin: units.gu(2)
135
rightMargin: units.gu(2)
136
topMargin: units.gu(1)
137
verticalCenter: parent.verticalCenter
139
fillMode: Image.PreserveAspectFit
144
onClicked: heroMessageHeader.appIconClicked()
157
transitions: Transition {
161
easing.type: Easing.OutQuad