2
* Copyright (C) 2013 Canonical, Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU 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 General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
import Ubuntu.Components 0.1
19
import "../../../Components/Time.js" as Time
28
leftMargin: units.gu(2)
29
rightMargin: units.gu(4)
31
height: childrenRect.height
37
topMargin: units.gu(1)
40
elide: Text.ElideRight
44
font.capitalization: Font.Capitalize
55
topMargin: units.gu(0.5)
57
text: root.model ? root.model.status : ""
58
elide: Text.ElideRight
64
wrapMode: Text.WordWrap
66
font.weight: Font.Light
71
top: contentLabel.bottom
72
topMargin: units.gu(1)
74
height: statusText.height + units.gu(2.5)
79
fillMode: Image.PreserveAspectFit
80
source: root.model ? root.model.statusServiceIcon : ""
84
text: if (root.model) {
85
var time = Time.readableFromNow(root.model.statusTime);
86
return time ? time : root.model.statusTime;
88
elide: Text.ElideRight