on xenial help sign in
Wrap the primaryFilter in a Flickable and have it respect the correct height
2e2b590Josh Arenson
qml/Dash/PageHeaderExtraPanel.qml+25−10
@@ -24,7 +24,7 @@ Item {
24
24
25 readonly property real searchesHeight: recentSearchesRepeater.count > 0 ? searchColumn.height + recentSearchesLabels.height + recentSearchesLabels.anchors.topMargin : 0
25 readonly property real searchesHeight: recentSearchesRepeater.count > 0 ? searchColumn.height + recentSearchesLabels.height + recentSearchesLabels.anchors.topMargin : 0
26
26
27− implicitHeight: searchesHeight + dashNavigation.implicitHeight + dashNavigation.anchors.topMargin + primaryFilter.height + primaryFilter.anchors.topMargin
27+ implicitHeight: searchesHeight + dashNavigation.implicitHeight + dashNavigation.anchors.topMargin + primaryFilterContainer.height + primaryFilterContainer.anchors.topMargin
28
28
29 // Set by parent
29 // Set by parent
30 property ListModel searchHistory
30 property ListModel searchHistory
@@ -124,7 +124,7 @@ Item {
124 color: "#888888"
124 color: "#888888"
125 }
125 }
126
126
127− divider.visible: index != recentSearchesRepeater.count - 1 || (scope && scope.hasNavigation) || primaryFilter.active
127+ divider.visible: index != recentSearchesRepeater.count - 1 || (scope && scope.hasNavigation) || primaryFilterContainer.primaryFilter.active
128
128
129 onClicked: root.historyItemClicked(query)
129 onClicked: root.historyItemClicked(query)
130 }
130 }
@@ -145,22 +145,37 @@ Item {
145 onLeafClicked: root.dashNavigationLeafClicked();
145 onLeafClicked: root.dashNavigationLeafClicked();
146 }
146 }
147
147
148− Filters.FilterWidgetFactory {
148+ Flickable {
149− id: primaryFilter
149+ id: primaryFilterContainer
150− active: scope && !scope.hasNavigation
151
150
152− property var filter: active ? scope.primaryNavigationFilter : null
151+ height: dashNavigation.availableHeight
153
152
154 anchors {
153 anchors {
155 top: recentSearchesRepeater.count > 0 ? searchColumn.bottom : parent.top
154 top: recentSearchesRepeater.count > 0 ? searchColumn.bottom : parent.top
156− topMargin: active && recentSearchesRepeater.count > 0 ? units.gu(2) : 0
155+ topMargin: primaryFilter.active && recentSearchesRepeater.count > 0 ? units.gu(2) : 0
157 left: parent.left
156 left: parent.left
158 right: parent.right
157 right: parent.right
159 }
158 }
160
159
160+ Filters.FilterWidgetFactory {
161+ id: primaryFilter
162+ active: scope && !scope.hasNavigation
163+
164+ anchors.fill: parent
165+ property var filter: active ? scope.primaryNavigationFilter : null
166+
161− widgetId: filter ? filter.filterId : ""
167+ widgetId: filter ? filter.filterId : ""
162− widgetType: filter ? filter.filterType : -1
168+ widgetType: filter ? filter.filterType : -1
163− widgetData: filter
169+ widgetData: filter
170+
171+ MouseArea {
172+ anchors.fill: parent
173+ onClicked: {
174+ propagateComposedEvents = true
175+ mouse.accepted = false
176+ }
177+ }
178+ }
164 }
179 }
165
180
166 // This is outside the item
181 // This is outside the item