@@ -17,7 +17,6 @@
17import QtQuick 2.2
17import QtQuick 2.2
18import Ubuntu.Components 1.1
18import Ubuntu.Components 1.1
19import Ubuntu.Components.Themes.Ambiance 1.1
19import Ubuntu.Components.Themes.Ambiance 1.1
20−import Ubuntu.Components.Popups 1.0
21import Ubuntu.Components.ListItems 1.0
20import Ubuntu.Components.ListItems 1.0
22import "../Components"
21import "../Components"
@@ -27,6 +26,7 @@ Item {
27 implicitHeight: headerContainer.height + bottomContainer.height + signatureLineHeight
26 implicitHeight: headerContainer.height + bottomContainer.height + signatureLineHeight
28 readonly property real signatureLineHeight: showSignatureLine ? units.gu(2) : 0
27 readonly property real signatureLineHeight: showSignatureLine ? units.gu(2) : 0
29+ property bool scopeHasFilters: false
30 property bool showBackButton: false
30 property bool showBackButton: false
31 property bool backIsClose: false
31 property bool backIsClose: false
32 property string title
32 property string title
@@ -55,6 +55,7 @@ Item {
55 signal settingsClicked()
55 signal settingsClicked()
56 signal favoriteClicked()
56 signal favoriteClicked()
57 signal searchTextFieldFocused()
57 signal searchTextFieldFocused()
58+ signal showFiltersPopup(var item)
59 onScopeStyleChanged: refreshLogo()
60 onScopeStyleChanged: refreshLogo()
60 onSearchQueryChanged: {
61 onSearchQueryChanged: {
@@ -204,15 +205,18 @@ Item {
206 secondaryItem: AbstractButton {
207 secondaryItem: AbstractButton {
208+ id: clearOrSettingsButton
207 height: searchTextField.height
209 height: searchTextField.height
208 width: height
210 width: height
209 enabled: searchTextField.text.length > 0 || root.navigationTag != ""
211 enabled: searchTextField.text.length > 0 || root.navigationTag != ""
213+ readonly property bool clearIsSettings: !searchTextField.focus && root.scopeHasFilters
212 objectName: "clearIcon"
216 objectName: "clearIcon"
213 anchors.fill: parent
217 anchors.fill: parent
214 anchors.margins: units.gu(.75)
218 anchors.margins: units.gu(.75)
215− source: "image://theme/clear"
219+ source: parent.clearIsSettings ? "image://theme/settings" : "image://theme/clear"
216 opacity: parent.enabled
220 opacity: parent.enabled
217 visible: opacity > 0
221 visible: opacity > 0
218 Behavior on opacity {
222 Behavior on opacity {
@@ -221,7 +225,11 @@ Item {
223 onClicked: {
227 onClicked: {
228+ if (clearIsSettings) {
229+ root.showFiltersPopup(clearOrSettingsButton);
224− root.clearSearch(true);
231+ root.clearSearch(true);