@@ -18,6 +18,7 @@ import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19import Ubuntu.Components.Popups 0.1
19import Ubuntu.Components.Popups 0.1
20import Ubuntu.Components.ListItems 0.1 as ListItem
20import Ubuntu.Components.ListItems 0.1 as ListItem
@@ -30,6 +31,7 @@ Item {
30 property bool searchEntryEnabled: false
31 property bool searchEntryEnabled: false
31 property alias searchQuery: searchField.text
32 property alias searchQuery: searchField.text
32 property ListModel searchHistory: SearchHistoryModel {}
33 property ListModel searchHistory: SearchHistoryModel {}
34 height: units.gu(8.5)
36 height: units.gu(8.5)
35 implicitHeight: units.gu(8.5)
37 implicitHeight: units.gu(8.5)
@@ -148,7 +150,7 @@ Item {
148 hasClearButton: false
150 hasClearButton: false
150 primaryItem: AbstractButton {
152 primaryItem: AbstractButton {
151− enabled: searchField.text != ""
153+ enabled: searchField.text != "" && !searchIndicator.running
152 onClicked: {
154 onClicked: {
153 if (searchField.text != "") {
155 if (searchField.text != "") {
154 searchHistory.addQuery(searchField.text)
156 searchHistory.addQuery(searchField.text)
@@ -158,8 +160,25 @@ Item {
158 height: parent.height
160 height: parent.height
159 width: height
161 width: height
165+ objectName: "searchIndicator"
168+ verticalCenter: parent.verticalCenter
170+ leftMargin: units.gu(0.5)
173+ running: scope.searchInProgress && searchField.text !== ""
174+ opacity: running ? 1 : 0
176+ Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration; easing.type: Easing.Linear } }
162 id: primaryImage
180 id: primaryImage
181+ objectName: "primaryImage"
163 anchors {
182 anchors {
164 verticalCenter: parent.verticalCenter
183 verticalCenter: parent.verticalCenter
165 left: parent.left
184 left: parent.left
@@ -167,6 +186,10 @@ Item {
168 width: units.gu(3)
187 width: units.gu(3)
169 height: units.gu(3)
188 height: units.gu(3)
189+ visible: opacity > 0
190+ opacity: searchIndicator.running ? 0 : 1
192+ Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.SnapDuration; easing.type: Easing.Linear } }