2
* Copyright 2013 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.0
19
import Ubuntu.Components.ListItems 1.0 as ListItem
22
id: expandingColumnItem
23
expandedHeight: contentColumn.height + units.gu(1)
24
collapsedHeight: headerRow.height
25
divider.visible: false
28
property string imageSource
29
default property alias data: contentColumn.data
37
anchors { top: parent.top; left: parent.left; right: parent.right }
40
anchors { left: parent.left; right: parent.right}
41
height: Math.max(24,label.paintedHeight)
43
source: expandingColumnItem.expanded ? "qrc:/ubuntu/images/view-collapse.svg" : "qrc:/ubuntu/images/view-expand.svg"
55
visible: imageSource.length > 0
56
anchors.verticalCenter: parent.verticalCenter
59
visible: imageSource.length > 0
65
text: expandingColumnItem.title