on xenial help sign in
Merge
058d56bAlbert Astals Cid
qml/Dash/DashNavigation.qml+2−8
@@ -74,7 +74,7 @@ Item {
74 delegate: DashNavigationHeader {
74 delegate: DashNavigationHeader {
75 objectName: "dashNavigationHeader" + index
75 objectName: "dashNavigationHeader" + index
76 height: index == 0 && headersModel.count > 1 ? 0 : units.gu(5)
76 height: index == 0 && headersModel.count > 1 ? 0 : units.gu(5)
77− width: parent.width
77+ width: headersColumn.width
78
78
79 backVisible: index != 0
79 backVisible: index != 0
80 text: headerText
80 text: headerText
@@ -115,12 +115,7 @@ Item {
115 left: parent.left
115 left: parent.left
116 right: parent.right
116 right: parent.right
117 }
117 }
118− property int maxHeight: -1
118+ readonly property int maxHeight: root.availableHeight - navigationListView.y
119− Component.onCompleted: updateMaxHeight();
120− function updateMaxHeight()
121− {
122− maxHeight = root.availableHeight - mapToItem(root, 0, 0).y;
123− }
124 property int prevHeight: maxHeight
119 property int prevHeight: maxHeight
125 height: currentItem ? currentItem.height : maxHeight
120 height: currentItem ? currentItem.height : maxHeight
126
121
@@ -137,7 +132,6 @@ Item {
137 property real desiredHeight: {
132 property real desiredHeight: {
138 if (navigation && navigation.loaded && x == navigationListView.contentX)
133 if (navigation && navigation.loaded && x == navigationListView.contentX)
139 {
134 {
140− navigationListView.updateMaxHeight();
141 return Math.min(implicitHeight, navigationListView.maxHeight);
135 return Math.min(implicitHeight, navigationListView.maxHeight);
142 } else {
136 } else {
143 return navigationListView.prevHeight;
137 return navigationListView.prevHeight;
qml/Dash/DashNavigationList.qml+3−3
@@ -55,10 +55,10 @@ Item {
55 delegate: ListItem {
55 delegate: ListItem {
56 objectName: root.objectName + "child" + index
56 objectName: root.objectName + "child" + index
57 height: root.itemHeight
57 height: root.itemHeight
58− width: parent.width
58+ width: column.width
59 anchors {
59 anchors {
60− left: parent.left
60+ left: column.left
61− right: parent.right
61+ right: column.right
62 leftMargin: units.gu(2)
62 leftMargin: units.gu(2)
63 rightMargin: units.gu(2)
63 rightMargin: units.gu(2)
64 }
64 }
qml/Dash/DashPageHeader.qml+20−30
@@ -261,8 +261,9 @@ Item {
261 visible: width > 0
261 visible: width > 0
262 anchors {
262 anchors {
263 top: parent.top
263 top: parent.top
264− right: cancelLabel.left
264+ right: cancelButton.left
265 bottom: parent.bottom
265 bottom: parent.bottom
266+ rightMargin: units.gu(-1)
266 }
267 }
267
268
268 Icon {
269 Icon {
@@ -277,25 +278,28 @@ Item {
277 }
278 }
278 }
279 }
279
280
280− Label {
281+ AbstractButton {
281− id: cancelLabel
282+ id: cancelButton
282− text: i18n.tr("Cancel")
283+ width: cancelLabel.width + cancelLabel.anchors.rightMargin + cancelLabel.anchors.leftMargin
283− color: header.panelForegroundColor
284− verticalAlignment: Text.AlignVCenter
285 anchors {
284 anchors {
286 top: parent.top
285 top: parent.top
287 right: parent.right
286 right: parent.right
288 bottom: parent.bottom
287 bottom: parent.bottom
289− margins: units.gu(2)
290 }
288 }
291− AbstractButton {
292− anchors.fill: parent
293− // So that clicking in the empty area on the left of Cancel
294− // has the same effect as clicking on the empty area on the right
295− anchors.leftMargin: units.gu(-2)
296− onClicked: {
289+ onClicked: {
297− root.clearSearch(false);
290+ root.clearSearch(false);
298− headerContainer.showSearch = false;
291+ headerContainer.showSearch = false;
292+ }
293+ Label {
294+ id: cancelLabel
295+ text: i18n.tr("Cancel")
296+ color: header.panelForegroundColor
297+ verticalAlignment: Text.AlignVCenter
298+ anchors {
299+ verticalCenter: parent.verticalCenter
300+ right: parent.right
301+ rightMargin: units.gu(2)
302+ leftMargin: units.gu(1)
299 }
303 }
300 }
304 }
301 }
305 }
@@ -314,6 +318,7 @@ Item {
314 property color panelColor: background.topColor
318 property color panelColor: background.topColor
315 panelForegroundColor: config.foregroundColor
319 panelForegroundColor: config.foregroundColor
316 config: PageHeadConfiguration {
320 config: PageHeadConfiguration {
321+ title: root.title
317 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
322 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
318 backAction: Action {
323 backAction: Action {
319 iconName: backIsClose ? "close" : "back"
324 iconName: backIsClose ? "close" : "back"
@@ -354,21 +359,6 @@ Item {
354 onTriggered: root.favoriteClicked()
359 onTriggered: root.favoriteClicked()
355 }
360 }
356 ]
361 ]
357−
358− contents: Label {
359− visible: header.contents === null
360− LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
361− anchors {
362− left: parent.left
363− right: parent.right
364− verticalCenter: parent.verticalCenter
365− }
366− text: root.title
367− font.weight: header.fontWeight
368− fontSize: header.fontSize
369− color: header.panelForegroundColor
370− elide: Text.ElideRight
371− }
372 }
362 }
373
363
374 property var contents: null
364 property var contents: null
qml/Dash/GenericScopeView.qml+1
@@ -671,6 +671,7 @@ FocusScope {
671 }
671 }
672 }
672 }
673 onShowFiltersPopup: { // item
673 onShowFiltersPopup: { // item
674+ extraPanel.visible = false;
674 scopeView.filtersPopover = PopupUtils.open(Qt.resolvedUrl("FiltersPopover.qml"), item, { "contentWidth": scopeView.width - units.gu(2) } );
675 scopeView.filtersPopover = PopupUtils.open(Qt.resolvedUrl("FiltersPopover.qml"), item, { "contentWidth": scopeView.width - units.gu(2) } );
675 }
676 }
676 }
677 }
qml/Dash/PageHeaderExtraPanel.qml+1−1
@@ -22,7 +22,7 @@ import "Filters" as Filters
22Item {
22Item {
23 id: root
23 id: root
24
24
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
26
26
27 implicitHeight: searchesHeight + dashNavigation.implicitHeight + dashNavigation.anchors.topMargin + primaryFilter.height + primaryFilter.anchors.topMargin
27 implicitHeight: searchesHeight + dashNavigation.implicitHeight + dashNavigation.anchors.topMargin + primaryFilter.height + primaryFilter.anchors.topMargin
28
28