@@ -16,7 +16,7 @@
1616
1717import QtQuick 2.4
1818import Ubuntu.Components 1.3
19−import Ubuntu.Components.ListItems 1.3
19+import Ubuntu.Components.ListItems 1.3 as ListItems
2020import "Filters" as Filters
2121
2222Item {
@@ -24,12 +24,11 @@ Item {
2424
2525 readonly property real searchesHeight: recentSearchesRepeater.count > 0 ? searchColumn.height + recentSearchesLabels.height + recentSearchesLabels.anchors.margins : 0
2626
27− implicitHeight: searchesHeight + dashNavigation.implicitHeight + primaryFilter.height
27+ implicitHeight: searchesHeight + dashNavigation.implicitHeight + dashNavigation.anchors.topMargin + primaryFilter.height + primaryFilter.anchors.topMargin
2828
2929 // Set by parent
3030 property ListModel searchHistory
3131 property var scope: null
32− property var scopeStyle: null
3332 property real windowHeight
3433
3534 // Used by PageHeader
@@ -47,6 +46,10 @@ Item {
4746 anchors.fill: parent
4847 }
4948
49+ ListItems.ThinDivider {
50+ anchors.top: parent.top
51+ }
52+
5053 Label {
5154 id: recentSearchesLabels
5255 text: i18n.tr("Recent Searches")
@@ -54,7 +57,7 @@ Item {
5457 anchors {
5558 top: parent.top
5659 left: parent.left
57− margins: units.gu(1)
60+ margins: units.gu(2)
5861 }
5962 }
6063
@@ -65,7 +68,7 @@ Item {
6568 anchors {
6669 top: parent.top
6770 right: parent.right
68− margins: units.gu(1)
71+ margins: units.gu(2)
6972 }
7073
7174 AbstractButton {
@@ -87,12 +90,39 @@ Item {
8790 objectName: "recentSearchesRepeater"
8891 model: searchHistory
8992
90− delegate: Standard {
91− showDivider: index < recentSearchesRepeater.count - 1
92− height: units.gu(4)
93− text: query
94− iconName: "search"
95− iconFrame: false
93+ delegate: ListItem {
94+ anchors {
95+ left: parent.left
96+ right: parent.right
97+ leftMargin: units.gu(2)
98+ rightMargin: units.gu(2)
99+ }
100+ height: units.gu(5)
101+
102+ Icon {
103+ id: searchIcon
104+ anchors {
105+ verticalCenter: parent.verticalCenter
106+ left: parent.left
107+ }
108+ height: units.gu(1.5)
109+ width: height
110+ name: "search"
111+ }
112+
113+ Label {
114+ anchors {
115+ verticalCenter: parent.verticalCenter
116+ left: searchIcon.right
117+ leftMargin: units.gu(1)
118+ right: parent.right
119+ }
120+ text: query
121+ color: "#888888"
122+ }
123+
124+ divider.visible: index != repeater.count - 1 || (scope && scope.hasNavigation) || primaryFilter.active
125+
96126 onClicked: root.historyItemClicked(text)
97127 }
98128 }
@@ -103,10 +133,10 @@ Item {
103133 scope: root.scope
104134 anchors {
105135 top: recentSearchesRepeater.count > 0 ? searchColumn.bottom : parent.top
136+ topMargin: implicitHeight && recentSearchesRepeater.count > 0 ? units.gu(2) : 0
106137 left: parent.left
107138 right: parent.right
108139 }
109− scopeStyle: root.scopeStyle
110140 availableHeight: windowHeight * 4 / 6 - searchesHeight
111141
112142 onLeafClicked: root.dashNavigationLeafClicked();
@@ -120,6 +150,7 @@ Item {
120150
121151 anchors {
122152 top: recentSearchesRepeater.count > 0 ? searchColumn.bottom : parent.top
153+ topMargin: active && recentSearchesRepeater.count > 0 ? units.gu(2) : 0
123154 left: parent.left
124155 right: parent.right
125156 }