on xenial help sign in
Remove background under header pagination dots, update dots assets, remove dash paper background, update bottom edge asset

Approved by: Albert Astals Cid, Unity8 CI Bot

commitaf5e04488580b85a4be5caae79aade4bb6d8de00 authorAndrea Cimitan <andrea.cimitan@gmail.com> dateWed 9 Nov 2016, 15:02 (10 years ago) parent8e86b3ce8b7e7f
11 files changed+23−63
qml/Dash/Dash.qml+1−1 qml/Dash/DashBackground.qml+2−11 qml/Dash/DashPageHeader.qml+16−48 qml/Dash/GenericScopeView.qml+1 qml/Dash/graphics/overview_hint@27.png qml/Dash/graphics/overview_hint@30.png qml/Dash/graphics/pagination_dot_off@30.png qml/Dash/graphics/pagination_dot_on@30.png qml/Dash/graphics/paper.png tests/qmltests/Dash/tst_DashPageHeader.qml+2−2 tests/qmltests/Dash/tst_GenericScopeView.qml+1−1
qml/Dash/Dash.qml+1−1
@@ -329,7 +329,7 @@ Showable {
329329 enabled: bottomEdgeController.progress == 0
330330 UbuntuNumberAnimation {}
331331 }
332− y: parent.height - height * (1 - bottomEdgeController.progress * 4)
332+ y: parent.height - height * (1 - bottomEdgeController.progress * 4) - units.gu(1)
333333 MouseArea {
334334 // Eat direct presses on the overview hint so that they do not end up in the card below
335335 anchors.fill: parent
qml/Dash/DashBackground.qml+2−11
@@ -15,16 +15,7 @@
1515 */
1616
1717import QtQuick 2.4
18−import QtQuick.Window 2.2
19−import ImageCache 0.1
2018
21−Image {
22− source: "image://unity8imagecache/" + Qt.resolvedUrl("graphics/paper.png")
23− fillMode: Image.PreserveAspectCrop
24− horizontalAlignment: Image.AlignRight
25− verticalAlignment: Image.AlignTop
26− // avoid CPU scaling when window size changes
27− readonly property int maxSize: Math.max(Screen.width, Screen.height)
28− sourceSize.width: maxSize
29− sourceSize.height: 0
19+Rectangle {
20+ color: "white"
3021}
qml/Dash/DashPageHeader.qml+16−48
@@ -25,7 +25,7 @@ Item {
2525 id: root
2626 objectName: "pageHeader"
2727 implicitHeight: headerContainer.height + signatureLineHeight
28− readonly property real signatureLineHeight: showSignatureLine ? units.gu(2) : 0
28+ readonly property real signatureLineHeight: showSignatureLine ? units.gu(2.5) : headerBottomLine.height
2929 readonly property real headerDividerLuminance: Style.luminance(bottomBorder.color)
3030
3131 property int activeFiltersCount: 0
@@ -44,7 +44,7 @@ Item {
4444 property ListModel searchHistory
4545 property alias searchQuery: searchTextField.text
4646 property alias searchHint: searchTextField.placeholderText
47− property bool showSignatureLine: true
47+ property bool showSignatureLine: false
4848
4949 property int paginationCount: 0
5050 property int paginationIndex: -1
@@ -414,68 +414,36 @@ Item {
414414 }
415415
416416 Rectangle {
417− id: bottomBorder
418− visible: showSignatureLine
417+ id: headerBottomLine
419418 anchors {
420419 top: headerContainer.bottom
421420 left: parent.left
422421 right: parent.right
423− bottom: parent.bottom
424− }
425−
426− color: root.scopeStyle ? root.scopeStyle.headerDividerColor : "#e0e0e0"
427−
428− Rectangle {
429− anchors {
430− top: parent.top
431− left: parent.left
432− right: parent.right
433− }
434− height: units.dp(1)
435− color: Qt.darker(parent.color, 1.1)
436422 }
423+ height: units.dp(1)
424+ color: theme.palette.normal.base
437425 }
438426
439427 Row {
440− visible: bottomBorder.visible
428+ anchors {
429+ top: headerContainer.bottom
430+ horizontalCenter: headerContainer.horizontalCenter
431+ topMargin: units.gu(1)
432+ }
433+ visible: showSignatureLine
441434 spacing: units.gu(.5)
442435 Repeater {
443436 objectName: "paginationRepeater"
444437 model: root.paginationCount
445− Image {
438+ Rectangle {
446439 objectName: "paginationDots_" + index
447440 height: units.gu(1)
448441 width: height
449− source: (index == root.paginationIndex) ? "graphics/pagination_dot_on.png" : "graphics/pagination_dot_off.png"
442+ radius: height / 2
443+ color: index == root.paginationIndex ? UbuntuColors.blue : "transparent"
444+ border.width: index == root.paginationIndex ? 0 : 1 // yes, one pixel and not 1dp
445+ border.color: theme.palette.normal.baseText
450446 }
451447 }
452− anchors {
453− top: headerContainer.bottom
454− horizontalCenter: headerContainer.horizontalCenter
455− topMargin: units.gu(.5)
456− }
457− }
458−
459− // FIXME this doesn't work with solid scope backgrounds due to z-ordering
460− Item {
461− id: bottomHighlight
462− visible: bottomBorder.visible
463− anchors {
464− top: parent.bottom
465− left: parent.left
466− right: parent.right
467− }
468− z: 1
469− height: units.dp(1)
470− opacity: 0.6
471−
472− Rectangle {
473− anchors.fill: parent
474− color: if (root.scopeStyle) {
475− Qt.lighter(Qt.rgba(root.scopeStyle.background.r,
476− root.scopeStyle.background.g,
477− root.scopeStyle.background.b, 1.0), 1.2);
478− } else "#CCFFFFFF"
479− }
480448 }
481449}
qml/Dash/GenericScopeView.qml+1
@@ -644,6 +644,7 @@ FocusScope {
644644 scopeHasFilters: scopeView.scope.filters != null
645645 activeFiltersCount: scopeView.scope.activeFiltersCount
646646 showBackButton: scopeView.hasBackAction
647+ showSignatureLine: !showBackButton
647648 searchEntryEnabled: true
648649 settingsEnabled: scopeView.scope && scopeView.scope.settings && scopeView.scope.settings.count > 0 || false
649650 favoriteEnabled: scopeView.scope && scopeView.scope.id !== "clickscope"
qml/Dash/graphics/overview_hint@27.pngdeleted

Binary file not shown.

qml/Dash/graphics/overview_hint@30.pngnew file

Binary file not shown.

qml/Dash/graphics/pagination_dot_off@30.pngdeleted

Binary file not shown.

qml/Dash/graphics/pagination_dot_on@30.pngdeleted

Binary file not shown.

qml/Dash/graphics/paper.pngdeleted

Binary file not shown.

tests/qmltests/Dash/tst_DashPageHeader.qml+2−2
@@ -173,9 +173,9 @@ Item {
173173 for (var j=0; j<paginationRepeater.count; j++) {
174174 var paginationDot = findChild(pageHeader, "paginationDots_"+j);
175175 if (i==j) {
176− compare(paginationDot.source.toString().indexOf("pagination_dot_on") > -1, true);
176+ compare(paginationDot.color, UbuntuColors.blue);
177177 } else {
178− compare(paginationDot.source.toString().indexOf("pagination_dot_off") > -1, true);
178+ compare(paginationDot.color.a, 0);
179179 }
180180 }
181181 }
tests/qmltests/Dash/tst_GenericScopeView.qml+1−1
@@ -485,7 +485,7 @@ Item {
485485 mouseClick(seeAll0);
486486 verify(category0.expanded);
487487 tryCompare(category0, "height", category0.item.expandedHeight + seeAll0.height);
488− tryCompare(genericScopeView.categoryView, "contentY", units.gu(8));
488+ tryCompare(genericScopeView.categoryView, "contentY", units.gu(8.5));
489489
490490 scrollToEnd();
491491