on xenial help sign in
Wrap the filters in a flickable
720dde3Albert Astals Cid
qml/Dash/FiltersPopover.qml+20−9
@@ -20,24 +20,35 @@ import Ubuntu.Components.Popups 1.2
20import "Filters" as Filters
20import "Filters" as Filters
21
21
22Popover {
22Popover {
23+ id: root
23 objectName: "filtersPopover"
24 objectName: "filtersPopover"
24− Column {
25+
26+ Flickable {
27+ id: flickable
25 anchors {
28 anchors {
26 top: parent.top
29 top: parent.top
27 left: parent.left
30 left: parent.left
28 right: parent.right
31 right: parent.right
29 }
32 }
33+ // Popover doesn't like being 75% or bigger than the screen (counting the "empty" part on top)
34+ height: Math.min(root.parent.height * 3 / 4 - flickable.mapToItem(null, 0, 0).y - 1, column.height);
35+ contentHeight: column.height
36+ contentWidth: width
37+
38+ Column {
39+ id: column
40+ width: parent.width
30
41
31− Repeater {
42+ Repeater {
32− id: repeater
33− model: scopeView.scope.filters
43+ model: scopeView.scope.filters
34
44
35− delegate: Filters.FilterWidgetFactory {
45+ delegate: Filters.FilterWidgetFactory {
36− width: parent.width
46+ width: parent.width
37
47
38− widgetId: id
48+ widgetId: id
39− widgetType: type
49+ widgetType: type
40− widgetData: filter
50+ widgetData: filter
51+ }
41 }
52 }
42 }
53 }
43 }
54 }