on xenial help sign in
Fix height calculations
commit7ef763a52f6a1219ee731fa75e32fe12bc39a16c authorAlbert Astals Cid <albert.astals@canonical.com> dateThu 3 Mar 2016, 15:24 (11 years ago) parent1da5976
2 files changed+2−8
qml/Dash/DashNavigation.qml+1−7 qml/Dash/PageHeaderExtraPanel.qml+1−1
qml/Dash/DashNavigation.qml+1−7
@@ -115,12 +115,7 @@ Item {
115115 left: parent.left
116116 right: parent.right
117117 }
118− property int maxHeight: -1
119− Component.onCompleted: updateMaxHeight();
120− function updateMaxHeight()
121− {
122− maxHeight = root.availableHeight - mapToItem(root, 0, 0).y;
123− }
118+ readonly property int maxHeight: root.availableHeight - navigationListView.y
124119 property int prevHeight: maxHeight
125120 height: currentItem ? currentItem.height : maxHeight
126121
@@ -137,7 +132,6 @@ Item {
137132 property real desiredHeight: {
138133 if (navigation && navigation.loaded && x == navigationListView.contentX)
139134 {
140− navigationListView.updateMaxHeight();
141135 return Math.min(implicitHeight, navigationListView.maxHeight);
142136 } else {
143137 return navigationListView.prevHeight;
qml/Dash/PageHeaderExtraPanel.qml+1−1
@@ -22,7 +22,7 @@ import "Filters" as Filters
2222Item {
2323 id: root
2424
25− readonly property real searchesHeight: recentSearchesRepeater.count > 0 ? searchColumn.height + recentSearchesLabels.height + recentSearchesLabels.anchors.margins : 0
25+ readonly property real searchesHeight: recentSearchesRepeater.count > 0 ? searchColumn.height + recentSearchesLabels.height + recentSearchesLabels.anchors.topMargin : 0
2626
2727 implicitHeight: searchesHeight + dashNavigation.implicitHeight + dashNavigation.anchors.topMargin + primaryFilter.height + primaryFilter.anchors.topMargin
2828