on xenial help sign in
Merge
b36e2bfAlbert Astals
qml/Dash/DashContent.qml+2−1
@@ -93,7 +93,7 @@ Item {
93 id: dashContentList
93 id: dashContentList
94 objectName: "dashContentList"
94 objectName: "dashContentList"
95
95
96− interactive: dashContent.scopes.loaded && currentItem && !currentItem.moving
96+ interactive: dashContent.scopes.loaded && currentItem && !currentItem.moving && !currentItem.departmentsShown
97
97
98 anchors.fill: parent
98 anchors.fill: parent
99 model: dashContent.model
99 model: dashContent.model
@@ -134,6 +134,7 @@ Item {
134 objectName: scope.id + " loader"
134 objectName: scope.id + " loader"
135
135
136 readonly property bool moving: item ? item.moving : false
136 readonly property bool moving: item ? item.moving : false
137+ readonly property bool departmentsShown: item ? item.departmentsShown : false
137 readonly property var categoryView: item ? item.categoryView : null
138 readonly property var categoryView: item ? item.categoryView : null
138 readonly property var theScope: scope
139 readonly property var theScope: scope
139
140
qml/Dash/DashDepartments.qml+8−1
@@ -39,6 +39,7 @@ AbstractButton {
39 height: visible ? units.gu(5) : 0
39 height: visible ? units.gu(5) : 0
40
40
41 onClicked: {
41 onClicked: {
42+ departmentListView.updateMaxHeight();
42 root.showList = !root.showList;
43 root.showList = !root.showList;
43 }
44 }
44
45
@@ -111,7 +112,12 @@ AbstractButton {
111 right: parent.right
112 right: parent.right
112 top: root.bottom
113 top: root.bottom
113 }
114 }
115+ property int maxHeight: -1
116+ Component.onCompleted: updateMaxHeight();
117+ function updateMaxHeight()
118+ {
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);
120+ }
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)
131 {
137 {
138+ departmentListView.updateMaxHeight();
132 return Math.min(implicitHeight, departmentListView.maxHeight);
139 return Math.min(implicitHeight, departmentListView.maxHeight);
133 } else {
140 } else {
134 return departmentListView.prevHeight;
141 return departmentListView.prevHeight;
qml/Dash/DashDepartmentsList.qml+1
@@ -54,6 +54,7 @@ Item {
54
54
55 anchors.fill: parent
55 anchors.fill: parent
56
56
57+ flickableDirection: Flickable.VerticalFlick
57 contentHeight: column.height
58 contentHeight: column.height
58 contentWidth: width
59 contentWidth: width
59
60
qml/Dash/GenericScopeView.qml+2
@@ -25,6 +25,7 @@ import "../Components/ListItems" as ListItems
25FocusScope {
25FocusScope {
26 id: scopeView
26 id: scopeView
27
27
28+ readonly property bool departmentsShown: pageHeaderLoader.item ? pageHeaderLoader.item.bottomItem.showList : false
28 property var scope: null
29 property var scope: null
29 property SortFilterProxyModel categories: categoryFilter
30 property SortFilterProxyModel categories: categoryFilter
30 property bool isCurrent: false
31 property bool isCurrent: false
@@ -151,6 +152,7 @@ FocusScope {
151 model: scopeView.categories
152 model: scopeView.categories
152 forceNoClip: previewListView.open
153 forceNoClip: previewListView.open
153 pixelAligned: true
154 pixelAligned: true
155+ interactive: !departmentsShown
154
156
155 property string expandedCategoryId: ""
157 property string expandedCategoryId: ""
156
158