18 import Ubuntu.Components 0.1
22 width: parent ? parent.width : units.gu(31)
23 height: body.height + bottomDividerLine.height
29 property bool selected:
false
38 property bool highlightWhenPressed:
true
45 property bool showDivider: __showDivider()
55 function __showDivider() {
62 }
else if (ListView.view !== null) {
63 model = ListView.view.model;
66 if (model && index === model.count - 1)
return false;
72 readonly
property int allowedOverlap: units.dp(1)
74 property real __heightToClip: {
77 if (typeof heightToClip !==
'undefined') {
78 if (heightToClip >= allowedOverlap) {
79 return heightToClip - allowedOverlap;
91 default property alias children: body.children
95 height: parent.height - __heightToClip
96 anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
97 clip: __heightToClip > 0
104 bottom: bottomDividerLine.top
106 height: childrenRect.height
110 id: bottomDividerLine
111 anchors.bottom: parent.bottom
120 bottom: bottomDividerLine.top
122 pressed: (emptyListItem.selected || (emptyListItem.highlightWhenPressed && emptyListItem.pressed)) ?
"pressed" :
""