34
34
// clip the action delegates while swiping left/right
41
model: [ i18n.tr("Basic"), i18n.tr("Colored divider"), i18n.tr("No divider") ]
42
delegate: ListItemWithLabel {
45
colorFrom: modelData == i18n.tr("Colored divider") ? UbuntuColors.red : Qt.rgba(0.0, 0.0, 0.0, 0.0)
46
colorTo: modelData == i18n.tr("Colored divider") ? UbuntuColors.green : Qt.rgba(0.0, 0.0, 0.0, 0.0)
47
visible: modelData != i18n.tr("No divider")
55
// no spacing between the list items in the Column
58
// compensate for the spacing of 0 by adding this
59
// Item inbetween the title and the list items.
64
// clip the action delegates while swiping left/right
67
37
ListItemWithLabel {
68
38
color: UbuntuColors.blue
69
39
text: i18n.tr("Colored")
130
className: "ListItem"
138
model: [ i18n.tr("Basic"), i18n.tr("Colored divider"), i18n.tr("No divider") ]
139
delegate: ListItemWithLabel {
142
colorFrom: modelData == i18n.tr("Colored divider") ? UbuntuColors.red : Qt.rgba(0.0, 0.0, 0.0, 0.0)
143
colorTo: modelData == i18n.tr("Colored divider") ? UbuntuColors.green : Qt.rgba(0.0, 0.0, 0.0, 0.0)
144
visible: modelData != i18n.tr("No divider")
151
className: "ListItem"
158
ViewItems.dragMode: true
159
ViewItems.onDragUpdated: {
160
if (event.status == ListItemDrag.Moving) {
161
model.move(event.from, event.to, 1)
166
ListElement { label: "Basic" }
167
ListElement { label: "Colored divider" }
168
ListElement { label: "No divider" }
171
delegate: ListItemWithLabel {
173
color: dragMode ? "lightblue" : "lightgray"
175
colorFrom: modelData == i18n.tr("Colored divider") ? UbuntuColors.red : Qt.rgba(0.0, 0.0, 0.0, 0.0)
176
colorTo: modelData == i18n.tr("Colored divider") ? UbuntuColors.green : Qt.rgba(0.0, 0.0, 0.0, 0.0)
177
visible: modelData != i18n.tr("No divider")