2
* Copyright (C) 2016 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 1.3
19
import Ubuntu.Components.ListItems 1.3 as ListItems
21
/*! Expandable Filter Widget. */
26
showsTitleOnItsOwn: true
28
implicitHeight: expandingItem.height
30
ListItems.Expandable {
32
objectName: "expandingItem"
34
expandedHeight: collapsedHeight + column.height
35
anchors.left: parent.left
36
anchors.right: parent.right
47
anchors.top: parent.top
48
height: expandingItem.collapsedHeight
49
anchors.left: parent.left
50
anchors.right: parent.right
53
anchors.left: parent.left
54
anchors.leftMargin: units.gu(2)
55
anchors.right: dropDown.left
56
anchors.verticalCenter: parent.verticalCenter
57
text: widgetData.title || ""
63
fillMode: Image.PreserveAspectFit
64
anchors.right: parent.right
65
anchors.rightMargin: units.gu(2)
66
anchors.verticalCenter: parent.verticalCenter
67
source: expandingItem.expanded ? "image://theme/up" : "image://theme/down"
73
anchors.left: parent.left
74
anchors.right: parent.right
75
anchors.top: titleHolder.bottom
79
model: widgetData.filters
81
delegate: FilterWidgetFactory {
88
ListItems.ThinDivider {
89
anchors.bottom: parent.bottom
90
visible: index !== repeater.count - 1