on xenial help sign in
Merge
commitb36e2bf5638d0261d94301e22414e27390a37b6d authorAlbert Astals <albert.astals@canonical.com> dateThu 7 Aug 2014, 10:23 (12 years ago) parent7f59c8554352ed
4 files changed+13−2
qml/Dash/DashContent.qml+2−1 qml/Dash/DashDepartments.qml+8−1 qml/Dash/DashDepartmentsList.qml+1 qml/Dash/GenericScopeView.qml+2
qml/Dash/DashContent.qml+2−1
@@ -93,7 +93,7 @@ Item {
9393 id: dashContentList
9494 objectName: "dashContentList"
9595
96− interactive: dashContent.scopes.loaded && currentItem && !currentItem.moving
96+ interactive: dashContent.scopes.loaded && currentItem && !currentItem.moving && !currentItem.departmentsShown
9797
9898 anchors.fill: parent
9999 model: dashContent.model
@@ -134,6 +134,7 @@ Item {
134134 objectName: scope.id + " loader"
135135
136136 readonly property bool moving: item ? item.moving : false
137+ readonly property bool departmentsShown: item ? item.departmentsShown : false
137138 readonly property var categoryView: item ? item.categoryView : null
138139 readonly property var theScope: scope
139140
qml/Dash/DashDepartments.qml+8−1
@@ -39,6 +39,7 @@ AbstractButton {
3939 height: visible ? units.gu(5) : 0
4040
4141 onClicked: {
42+ departmentListView.updateMaxHeight();
4243 root.showList = !root.showList;
4344 }
4445
@@ -111,7 +112,12 @@ AbstractButton {
111112 right: parent.right
112113 top: root.bottom
113114 }
114− readonly property int maxHeight: (windowHeight - mapToItem(null, root.x, root.y).y) - units.gu(8)
115+ property int maxHeight: -1
116+ Component.onCompleted: updateMaxHeight();
117+ function updateMaxHeight()
118+ {
119+ maxHeight = (windowHeight - mapToItem(null, 0, 0).y) - units.gu(8);
120+ }
115121 property int prevHeight: maxHeight
116122 height: currentItem ? currentItem.height : maxHeight
117123 onHeightChanged: {
@@ -129,6 +135,7 @@ AbstractButton {
129135 if (root.showList) {
130136 if (department && department.loaded && x == departmentListView.contentX)
131137 {
138+ departmentListView.updateMaxHeight();
132139 return Math.min(implicitHeight, departmentListView.maxHeight);
133140 } else {
134141 return departmentListView.prevHeight;
qml/Dash/DashDepartmentsList.qml+1
@@ -54,6 +54,7 @@ Item {
5454
5555 anchors.fill: parent
5656
57+ flickableDirection: Flickable.VerticalFlick
5758 contentHeight: column.height
5859 contentWidth: width
5960
qml/Dash/GenericScopeView.qml+2
@@ -25,6 +25,7 @@ import "../Components/ListItems" as ListItems
2525FocusScope {
2626 id: scopeView
2727
28+ readonly property bool departmentsShown: pageHeaderLoader.item ? pageHeaderLoader.item.bottomItem.showList : false
2829 property var scope: null
2930 property SortFilterProxyModel categories: categoryFilter
3031 property bool isCurrent: false
@@ -151,6 +152,7 @@ FocusScope {
151152 model: scopeView.categories
152153 forceNoClip: previewListView.open
153154 pixelAligned: true
155+ interactive: !departmentsShown
154156
155157 property string expandedCategoryId: ""
156158