on xenial help sign in
Merge
commit229be7ce14dae89df40c63e08e9375fa6750a2bd authorAlbert Astals Cid <albert.astals@canonical.com> dateFri 6 Nov 2015, 16:46 (11 years ago) parentbf1555bd14f9b1
5 files changed+14−25
qml/Dash/DashPageHeader.qml+6−18 qml/Dash/GenericScopeView.qml+2−1 tests/qmltests/Dash/tst_DashContent.qml+4−4 tests/qmltests/Dash/tst_GenericScopeView.qml+1−1 tests/qmltests/Dash/tst_PreviewListView.qml+1−1
qml/Dash/DashPageHeader.qml+6−18
@@ -23,7 +23,7 @@ import "../Components"
2323Item {
2424 id: root
2525 objectName: "pageHeader"
26− implicitHeight: headerContainer.height + bottomContainer.height + signatureLineHeight
26+ implicitHeight: headerContainer.height + signatureLineHeight
2727 readonly property real signatureLineHeight: showSignatureLine ? units.gu(2) : 0
2828
2929 property int activeFiltersCount: 0
@@ -44,7 +44,6 @@ Item {
4444 property alias searchHint: searchTextField.placeholderText
4545 property bool showSignatureLine: true
4646
47− property alias bottomItem: bottomContainer.children
4847 property int paginationCount: 0
4948 property int paginationIndex: -1
5049
@@ -129,9 +128,10 @@ Item {
129128 }
130129
131130 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) }
133132 visible: headerContainer.showSearch
134133 onPressed: {
134+ extraPanel.visible = false;
135135 closePopup(/* keepFocus */false);
136136 mouse.accepted = false;
137137 }
@@ -296,7 +296,6 @@ Item {
296296 property color panelColor: background.topColor
297297 panelForegroundColor: config.foregroundColor
298298 config: PageHeadConfiguration {
299− title: root.title
300299 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
301300 backAction: Action {
302301 iconName: backIsClose ? "close" : "back"
@@ -346,7 +345,7 @@ Item {
346345 right: parent.right
347346 verticalCenter: parent.verticalCenter
348347 }
349− text: header.title
348+ text: root.title
350349 font.weight: header.fontWeight
351350 fontSize: header.fontSize
352351 color: header.panelForegroundColor
@@ -392,7 +391,7 @@ Item {
392391 top: headerContainer.bottom
393392 left: parent.left
394393 right: parent.right
395− bottom: bottomContainer.top
394+ bottom: parent.bottom
396395 }
397396
398397 color: root.scopeStyle ? root.scopeStyle.headerDividerColor : "#e0e0e0"
@@ -433,7 +432,7 @@ Item {
433432 id: bottomHighlight
434433 visible: bottomBorder.visible
435434 anchors {
436− top: bottomContainer.top
435+ top: parent.bottom
437436 left: parent.left
438437 right: parent.right
439438 }
@@ -456,15 +455,4 @@ Item {
456455 } else "#CCFFFFFF"
457456 }
458457 }
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− }
470458}
qml/Dash/GenericScopeView.qml+2−1
@@ -629,7 +629,7 @@ FocusScope {
629629 settingsEnabled: scopeView.scope && scopeView.scope.settings && scopeView.scope.settings.count > 0 || false
630630 favoriteEnabled: scopeView.scope && scopeView.scope.id !== "clickscope"
631631 favorite: scopeView.scope && scopeView.scope.favorite
632− navigationTag: scopeView.scope && scopeView.scope.primaryNavigationTag
632+ navigationTag: scopeView.scope ? scopeView.scope.primaryNavigationTag : ""
633633 scopeStyle: scopeView.scopeStyle
634634 paginationCount: scopeView.paginationCount
635635 paginationIndex: scopeView.paginationIndex
@@ -675,6 +675,7 @@ FocusScope {
675675
676676 onDashNavigationLeafClicked: {
677677 categoryView.pageHeader.closePopup();
678+ categoryView.pageHeader.unfocus();
678679 }
679680 }
680681 }
tests/qmltests/Dash/tst_DashContent.qml+4−4
@@ -215,7 +215,7 @@ Item {
215215 verify(pageHeader, "Could not find the scope page header.");
216216 var innerHeader = findChild(pageHeader, "innerPageHeader");
217217 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);
219219 }
220220
221221 function test_is_active_data() {
@@ -285,7 +285,7 @@ Item {
285285 tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
286286 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
287287 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
288− var searchButton = findChild(dashContentList.currentItem, "search_header_button");
288+ var searchButton = findChild(dashContentList.currentItem, "search_action_button");
289289 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
290290 compare(peExtraPanel.visible, false);
291291 mouseClick(searchButton);
@@ -405,7 +405,7 @@ Item {
405405 tryCompareFunction(function() { return findChild(dashContentList.currentItem, "dashNavigation") != null; }, true);
406406 var dashNavigation = findChild(dashContentList.currentItem, "dashNavigation");
407407 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
408− var searchButton = findChild(dashContentList.currentItem, "search_header_button");
408+ var searchButton = findChild(dashContentList.currentItem, "search_action_button");
409409 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
410410 compare(peExtraPanel.visible, false);
411411 mouseClick(searchButton);
@@ -497,7 +497,7 @@ Item {
497497
498498 function test_clearSearchWithNavigationClosed() {
499499 var dashContentList = findChild(dashContent, "dashContentList");
500− var searchButton = findChild(dashContentList.currentItem, "search_header_button");
500+ var searchButton = findChild(dashContentList.currentItem, "search_action_button");
501501 var peExtraPanel = findChild(dashContentList.currentItem, "peExtraPanel");
502502 var searchTextField = findChild(dashContentList.currentItem, "searchTextField");
503503
tests/qmltests/Dash/tst_GenericScopeView.qml+1−1
@@ -500,7 +500,7 @@ Item {
500500 mouseClick(seeAll0);
501501 verify(category0.expanded);
502502 tryCompare(category0, "height", category0.item.expandedHeight + seeAll0.height);
503− tryCompare(genericScopeView.categoryView, "contentY", units.gu(9));
503+ tryCompare(genericScopeView.categoryView, "contentY", units.gu(8));
504504
505505 scrollToEnd();
506506
tests/qmltests/Dash/tst_PreviewListView.qml+1−1
@@ -91,7 +91,7 @@ Rectangle {
9191 var header = findChild(listView, "innerPageHeader");
9292 verify(header, "Could not find the preview header");
9393
94− compare(header.config.title, "Mock Scope");
94+ compare(header.config.contents.text, "Mock Scope");
9595 }
9696
9797 function test_header_style() {