@@ -39,6 +39,7 @@ AbstractButton {
39 height: visible ? units.gu(5) : 0
39 height: visible ? units.gu(5) : 0
41 onClicked: {
41 onClicked: {
42+ departmentListView.updateMaxHeight();
42 root.showList = !root.showList;
43 root.showList = !root.showList;
@@ -111,7 +112,12 @@ AbstractButton {
111 right: parent.right
112 right: parent.right
112 top: root.bottom
113 top: root.bottom
115+ property int maxHeight: -1
116+ Component.onCompleted: updateMaxHeight();
117+ function updateMaxHeight()
114− readonly property int maxHeight: (windowHeight - mapToItem(null, root.x, root.y).y) - units.gu(8)
119+ maxHeight = (windowHeight - mapToItem(null, 0, 0).y) - units.gu(8);
115 property int prevHeight: maxHeight
121 property int prevHeight: maxHeight
116 height: currentItem ? currentItem.height : maxHeight
122 height: currentItem ? currentItem.height : maxHeight
117 onHeightChanged: {
123 onHeightChanged: {
@@ -129,6 +135,7 @@ AbstractButton {
129 if (root.showList) {
135 if (root.showList) {
130 if (department && department.loaded && x == departmentListView.contentX)
136 if (department && department.loaded && x == departmentListView.contentX)
138+ departmentListView.updateMaxHeight();
132 return Math.min(implicitHeight, departmentListView.maxHeight);
139 return Math.min(implicitHeight, departmentListView.maxHeight);
134 return departmentListView.prevHeight;
141 return departmentListView.prevHeight;