on xenial help sign in
Merge
229be7cAlbert Astals Cid
qml/Dash/DashPageHeader.qml+6−18
@@ -23,7 +23,7 @@ import "../Components"
23Item {
23Item {
24 id: root
24 id: root
25 objectName: "pageHeader"
25 objectName: "pageHeader"
26− implicitHeight: headerContainer.height + bottomContainer.height + signatureLineHeight
26+ implicitHeight: headerContainer.height + signatureLineHeight
27 readonly property real signatureLineHeight: showSignatureLine ? units.gu(2) : 0
27 readonly property real signatureLineHeight: showSignatureLine ? units.gu(2) : 0
28
28
29 property int activeFiltersCount: 0
29 property int activeFiltersCount: 0
@@ -44,7 +44,6 @@ Item {
44 property alias searchHint: searchTextField.placeholderText
44 property alias searchHint: searchTextField.placeholderText
45 property bool showSignatureLine: true
45 property bool showSignatureLine: true
46
46
47− property alias bottomItem: bottomContainer.children
48 property int paginationCount: 0
47 property int paginationCount: 0
49 property int paginationIndex: -1
48 property int paginationIndex: -1
50
49
@@ -129,9 +128,10 @@ Item {
129 }
128 }
130
129
131 InverseMouseArea {
130 InverseMouseArea {
132− anchors { fill: parent; margins: units.gu(1); bottomMargin: units.gu(3) + bottomContainer.height }
131+ anchors { fill: parent; margins: units.gu(1); bottomMargin: units.gu(3) + (extraPanel ? extraPanel.height : 0) }
133 visible: headerContainer.showSearch
132 visible: headerContainer.showSearch
134 onPressed: {
133 onPressed: {
134+ extraPanel.visible = false;
135 closePopup(/* keepFocus */false);
135 closePopup(/* keepFocus */false);
136 mouse.accepted = false;
136 mouse.accepted = false;
137 }
137 }
@@ -296,7 +296,6 @@ Item {
296 property color panelColor: background.topColor
296 property color panelColor: background.topColor
297 panelForegroundColor: config.foregroundColor
297 panelForegroundColor: config.foregroundColor
298 config: PageHeadConfiguration {
298 config: PageHeadConfiguration {
299− title: root.title
300 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
299 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
301 backAction: Action {
300 backAction: Action {
302 iconName: backIsClose ? "close" : "back"
301 iconName: backIsClose ? "close" : "back"
@@ -346,7 +345,7 @@ Item {
346 right: parent.right
345 right: parent.right
347 verticalCenter: parent.verticalCenter
346 verticalCenter: parent.verticalCenter
348 }
347 }
349− text: header.title
348+ text: root.title
350 font.weight: header.fontWeight
349 font.weight: header.fontWeight
351 fontSize: header.fontSize
350 fontSize: header.fontSize
352 color: header.panelForegroundColor
351 color: header.panelForegroundColor
@@ -392,7 +391,7 @@ Item {
392 top: headerContainer.bottom
391 top: headerContainer.bottom
393 left: parent.left
392 left: parent.left
394 right: parent.right
393 right: parent.right
395− bottom: bottomContainer.top
394+ bottom: parent.bottom
396 }
395 }
397
396
398 color: root.scopeStyle ? root.scopeStyle.headerDividerColor : "#e0e0e0"
397 color: root.scopeStyle ? root.scopeStyle.headerDividerColor : "#e0e0e0"
@@ -433,7 +432,7 @@ Item {
433 id: bottomHighlight
432 id: bottomHighlight
434 visible: bottomBorder.visible
433 visible: bottomBorder.visible
435 anchors {
434 anchors {
436− top: bottomContainer.top
435+ top: parent.bottom
437 left: parent.left
436 left: parent.left
438 right: parent.right
437 right: parent.right
439 }
438 }
@@ -456,15 +455,4 @@ Item {
456 } else "#CCFFFFFF"
455 } else "#CCFFFFFF"
457 }
456 }
458 }
457 }
459−
460− Item {
461− id: bottomContainer
462−
463− anchors {
464− left: parent.left
465− right: parent.right
466− bottom: parent.bottom
467− }
468− height: childrenRect.height
469− }
470}
458}
qml/Dash/GenericScopeView.qml+2−1
@@ -629,7 +629,7 @@ FocusScope {
629 settingsEnabled: scopeView.scope && scopeView.scope.settings && scopeView.scope.settings.count > 0 || false
629 settingsEnabled: scopeView.scope && scopeView.scope.settings && scopeView.scope.settings.count > 0 || false
630 favoriteEnabled: scopeView.scope && scopeView.scope.id !== "clickscope"
630 favoriteEnabled: scopeView.scope && scopeView.scope.id !== "clickscope"
631 favorite: scopeView.scope && scopeView.scope.favorite
631 favorite: scopeView.scope && scopeView.scope.favorite
632− navigationTag: scopeView.scope && scopeView.scope.primaryNavigationTag
632+ navigationTag: scopeView.scope ? scopeView.scope.primaryNavigationTag : ""
633 scopeStyle: scopeView.scopeStyle
633 scopeStyle: scopeView.scopeStyle
634 paginationCount: scopeView.paginationCount
634 paginationCount: scopeView.paginationCount
635 paginationIndex: scopeView.paginationIndex
635 paginationIndex: scopeView.paginationIndex
@@ -675,6 +675,7 @@ FocusScope {
675
675
676 onDashNavigationLeafClicked: {
676 onDashNavigationLeafClicked: {
677 categoryView.pageHeader.closePopup();
677 categoryView.pageHeader.closePopup();
678+ categoryView.pageHeader.unfocus();
678 }
679 }
679 }
680 }
680 }
681 }
tests/qmltests/Dash/tst_DashContent.qml+4−4
@@ -215,7 +215,7 @@ Item {
215 verify(pageHeader, "Could not find the scope page header.");
215 verify(pageHeader, "Could not find the scope page header.");
216 var innerHeader = findChild(pageHeader, "innerPageHeader");
216 var innerHeader = findChild(pageHeader, "innerPageHeader");
217 verify(innerHeader, "Could not find the scope page header.");
217 verify(innerHeader, "Could not find the scope page header.");
218− compare(innerHeader.config.title, scopesModel.getScope(data.index).name);
218+ compare(innerHeader.config.contents.text, scopesModel.getScope(data.index).name);
219 }
219 }
220
220
221 function test_is_active_data() {
221 function test_is_active_data() {
@@ -285,7 +285,7 @@ Item {
285 tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
285 tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
286 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
286 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
287 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
287 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
288− var searchButton = findChild(dashContentList.currentItem, "search_header_button");
288+ var searchButton = findChild(dashContentList.currentItem, "search_action_button");
289 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
289 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
290 compare(peExtraPanel.visible, false);
290 compare(peExtraPanel.visible, false);
291 mouseClick(searchButton);
291 mouseClick(searchButton);
@@ -405,7 +405,7 @@ Item {
405 tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
405 tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
406 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
406 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
407 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
407 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
408− var searchButton = findChild(dashContentList.currentItem, "search_header_button");
408+ var searchButton = findChild(dashContentList.currentItem, "search_action_button");
409 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
409 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
410 compare(peExtraPanel.visible, false);
410 compare(peExtraPanel.visible, false);
411 mouseClick(searchButton);
411 mouseClick(searchButton);
@@ -497,7 +497,7 @@ Item {
497
497
498 function test_clearSearchWithNavigationClosed() {
498 function test_clearSearchWithNavigationClosed() {
499 var dashContentList = findChild(dashContent, "dashContentList");
499 var dashContentList = findChild(dashContent, "dashContentList");
500− var searchButton = findChild(dashContentList.currentItem, "search_header_button");
500+ var searchButton = findChild(dashContentList.currentItem, "search_action_button");
501 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
501 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
502 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
502 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
503
503
tests/qmltests/Dash/tst_GenericScopeView.qml+1−1
@@ -500,7 +500,7 @@ Item {
500 mouseClick(seeAll0);
500 mouseClick(seeAll0);
501 verify(category0.expanded);
501 verify(category0.expanded);
502 tryCompare(category0, "height", category0.item.expandedHeight + seeAll0.height);
502 tryCompare(category0, "height", category0.item.expandedHeight + seeAll0.height);
503− tryCompare(genericScopeView.categoryView, "contentY", units.gu(9));
503+ tryCompare(genericScopeView.categoryView, "contentY", units.gu(8));
504
504
505 scrollToEnd();
505 scrollToEnd();
506
506
tests/qmltests/Dash/tst_PreviewListView.qml+1−1
@@ -91,7 +91,7 @@ Rectangle {
91 var header = findChild(listView, "innerPageHeader");
91 var header = findChild(listView, "innerPageHeader");
92 verify(header, "Could not find the preview header");
92 verify(header, "Could not find the preview header");
93
93
94− compare(header.config.title, "Mock Scope");
94+ compare(header.config.contents.text, "Mock Scope");
95 }
95 }
96
96
97 function test_header_style() {
97 function test_header_style() {