2
* Copyright 2015 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/>.
18
import Ubuntu.Components 1.3
21
objectName: "listItemLayoutTemplate"
24
className: "ListItemLayout"
25
title: "Examples of core apps list items"
26
// no spacing between the list items in the Column
30
id: addressbookListItem
31
height: addressbookLayout.height + (divider.visible ? divider.height : 0)
36
title.color: UbuntuColors.lightAubergine
37
title.text: "Address book list item: Name goes here"
40
SlotsLayout.position: SlotsLayout.Leading
50
id: addressbookDetailsListItem
51
height: addressbookDetailsLayout.height + (divider.visible ? divider.height : 0)
53
id: addressbookDetailsLayout
55
title.color: UbuntuColors.lightAubergine
56
title.text: "+12 3456789012"
57
subtitle.text: "Mobile"
74
id: telegramContactsListItem
76
height: telegramContactsLayout.height + (divider.visible ? divider.height : 0)
79
id: telegramContactsLayout
80
title.text: "Telegram Name goes here"
81
subtitle.text: "last seen 12:02"
85
SlotsLayout.position: SlotsLayout.Leading
95
height: systemSettings1_layout.height + (divider.visible ? divider.height : 0)
98
id: systemSettings1_layout
99
title.text: "Call forwarding"
104
font.pixelSize: FontUtils.sizeToPixels("medium")
113
height: systemSettings2_layout.height + (divider.visible ? divider.height : 0)
116
id: systemSettings2_layout
117
title.text: "Flight mode"
119
//see http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/wily/ubuntu-system-settings/wily-proposed/view/head:/src/qml/EntryComponent.qml
121
SlotsLayout.position: SlotsLayout.Leading
124
name: "airplane-mode"
132
height: systemSettings3_layout.height + (divider.visible ? divider.height : 0)
135
id: systemSettings3_layout
136
title.text: "الفيسبوك"
137
subtitle.text: "الفيسبوك"
139
LayoutMirroring.enabled: true
140
LayoutMirroring.childrenInherit: true
145
SlotsLayout.position: SlotsLayout.Leading
155
className: "ListItemLayout"
156
title: "Custom labels properties"
160
height: customLabelsLayout.height + (divider.visible ? divider.height : 0)
163
id: customLabelsLayout
164
title.text: "Lorem ipsum..."
166
title.horizontalAlignment: Text.AlignHCenter
168
subtitle.text: "..dolor sit amet, consectetur adipiscing elit..."
169
subtitle.color: "red"
170
subtitle.horizontalAlignment: Text.AlignHCenter
172
summary.text: "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." +
173
"Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi" +
174
"ut aliquip ex ea commodo consequat."
175
summary.color: "green"
176
summary.horizontalAlignment: Text.AlignHCenter
182
className: "ListItemLayout"
183
title: "With swiping actions"
184
// no spacing between the list items in the Column
188
id: exampleLeadingActions
196
id: exampleTrailingActions
208
title.text: i18n.tr("Leading and trailing actions")
209
leadingActions: exampleLeadingActions
210
trailingActions: exampleTrailingActions
216
className: "ListItemLayout"
217
title: "Custom vertical positioning of slots"
218
// no spacing between the list items in the Column
222
id: dialerHistoryListItem
223
height: dialerHistoryLayout.height + (divider.visible ? divider.height : 0)
226
id: dialerHistoryLayout
228
title.text: "+12 3456789012 (3)"
229
title.color: UbuntuColors.lightAubergine
230
subtitle.text: "Mobile"
233
SlotsLayout.position: SlotsLayout.Leading
243
height: parent.height
244
//as we want to position labels to align with title and subtitle
245
SlotsLayout.overrideVerticalPositioning: true
249
anchors.right: label2.right
252
y: dialerHistoryLayout.mainSlot.y + dialerHistoryLayout.title.y
253
+ dialerHistoryLayout.title.baselineOffset - baselineOffset
260
y: dialerHistoryLayout.mainSlot.y + dialerHistoryLayout.subtitle.y
261
+ dialerHistoryLayout.subtitle.baselineOffset - baselineOffset