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/ListItems" as ListItems
23
highlightWhenPressed: false
29
height: phoneButton.height
36
width: parent.width - units.gu(7)
37
height: Math.max(units.gu(8), phoneColumn.height + units.gu(2))
40
spacing: units.gu(0.5)
43
topMargin: units.gu(1)
45
leftMargin: units.gu(2)
51
if (location) parts.push(location)
52
if (type && type != "voice") parts.push(type)
53
if (parts.length == 0) return "other"
54
return parts.join(" ")
56
elide: Text.ElideRight
60
font.capitalization: Font.Capitalize
67
elide: Text.ElideRight
73
wrapMode: Text.WordWrap
75
font.weight: Font.Light
81
pressed: phoneButton.pressed
84
onClicked: phoneClicked()
93
anchors.centerIn: parent
96
source: "../graphics/icon_write_text.png"
97
fillMode: Image.PreserveAspectFit
100
ListItems.Highlight {
102
pressed: textButton.pressed
105
onClicked: textClicked()