@@ -16,7 +16,7 @@
17import QtQuick 2.4
17import QtQuick 2.4
18import Ubuntu.Components 1.3
18import Ubuntu.Components 1.3
19−import Ubuntu.Components.ListItems 1.3
19+import Ubuntu.Components.ListItems 1.3 as ListItems
20import "Filters" as Filters
20import "Filters" as Filters
@@ -24,12 +24,11 @@ Item {
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.margins : 0
27− implicitHeight: searchesHeight + dashNavigation.implicitHeight + primaryFilter.height
27+ implicitHeight: searchesHeight + dashNavigation.implicitHeight + dashNavigation.anchors.topMargin + primaryFilter.height + primaryFilter.anchors.topMargin
29 // Set by parent
29 // Set by parent
30 property ListModel searchHistory
30 property ListModel searchHistory
31 property var scope: null
31 property var scope: null
32− property var scopeStyle: null
33 property real windowHeight
32 property real windowHeight
35 // Used by PageHeader
34 // Used by PageHeader
@@ -47,6 +46,10 @@ Item {
47 anchors.fill: parent
46 anchors.fill: parent
49+ ListItems.ThinDivider {
50+ anchors.top: parent.top
51 id: recentSearchesLabels
54 id: recentSearchesLabels
52 text: i18n.tr("Recent Searches")
55 text: i18n.tr("Recent Searches")
@@ -54,7 +57,7 @@ Item {
55 top: parent.top
58 top: parent.top
56 left: parent.left
59 left: parent.left
57− margins: units.gu(1)
60+ margins: units.gu(2)
@@ -65,7 +68,7 @@ Item {
66 top: parent.top
69 top: parent.top
67 right: parent.right
70 right: parent.right
68− margins: units.gu(1)
71+ margins: units.gu(2)
71 AbstractButton {
74 AbstractButton {
@@ -87,12 +90,39 @@ Item {
87 objectName: "recentSearchesRepeater"
90 objectName: "recentSearchesRepeater"
88 model: searchHistory
91 model: searchHistory
90− delegate: Standard {
93+ delegate: ListItem {
91− showDivider: index < recentSearchesRepeater.count - 1
94+ anchors {
92− height: units.gu(4)
95+ left: parent.left
93− text: query
96+ right: parent.right
94− iconName: "search"
97+ leftMargin: units.gu(2)
95− iconFrame: false
98+ rightMargin: units.gu(2)
105+ verticalCenter: parent.verticalCenter
108+ height: units.gu(1.5)
115+ verticalCenter: parent.verticalCenter
116+ left: searchIcon.right
117+ leftMargin: units.gu(1)
124+ divider.visible: index != repeater.count - 1 || (scope && scope.hasNavigation) || primaryFilter.active
96 onClicked: root.historyItemClicked(text)
126 onClicked: root.historyItemClicked(text)
@@ -103,10 +133,10 @@ Item {
103 scope: root.scope
133 scope: root.scope
104 anchors {
134 anchors {
105 top: recentSearchesRepeater.count > 0 ? searchColumn.bottom : parent.top
135 top: recentSearchesRepeater.count > 0 ? searchColumn.bottom : parent.top
136+ topMargin: implicitHeight && recentSearchesRepeater.count > 0 ? units.gu(2) : 0
106 left: parent.left
137 left: parent.left
107 right: parent.right
138 right: parent.right
109− scopeStyle: root.scopeStyle
110 availableHeight: windowHeight * 4 / 6 - searchesHeight
140 availableHeight: windowHeight * 4 / 6 - searchesHeight
112 onLeafClicked: root.dashNavigationLeafClicked();
142 onLeafClicked: root.dashNavigationLeafClicked();
@@ -120,6 +150,7 @@ Item {
121 anchors {
151 anchors {
122 top: recentSearchesRepeater.count > 0 ? searchColumn.bottom : parent.top
152 top: recentSearchesRepeater.count > 0 ? searchColumn.bottom : parent.top
153+ topMargin: active && recentSearchesRepeater.count > 0 ? units.gu(2) : 0
123 left: parent.left
154 left: parent.left
124 right: parent.right
155 right: parent.right