@@ -26,6 +26,7 @@ Item {
26 implicitHeight: headerContainer.height + bottomContainer.height + signatureLineHeight
26 implicitHeight: headerContainer.height + bottomContainer.height + signatureLineHeight
27 readonly property real signatureLineHeight: showSignatureLine ? units.gu(2) : 0
27 readonly property real signatureLineHeight: showSignatureLine ? units.gu(2) : 0
29+ property int activeFiltersCount: 0
29 property bool scopeHasFilters: false
30 property bool scopeHasFilters: false
30 property bool showBackButton: false
31 property bool showBackButton: false
31 property bool backIsClose: false
32 property bool backIsClose: false
@@ -206,31 +207,42 @@ Item {
206 text: root.navigationTag
207 text: root.navigationTag
209− secondaryItem: AbstractButton {
210+ secondaryItem: Row {
210− id: clearOrSettingsButton
211 height: searchTextField.height
211 height: searchTextField.height
214+ id: clearOrSettingsButton
215+ height: parent.height
212− width: height
216+ width: height
213− enabled: searchTextField.text.length > 0 || root.navigationTag != ""
217+ enabled: searchTextField.text.length > 0 || root.navigationTag != ""
216− objectName: "clearIcon"
220+ objectName: "clearIcon"
217− anchors.fill: parent
221+ anchors.fill: parent
218− anchors.margins: units.gu(.75)
222+ anchors.margins: units.gu(.75)
219− source: searchTextField.clearIsSettings ? "image://theme/settings" : "image://theme/clear"
223+ source: searchTextField.clearIsSettings ? "image://theme/settings" : "image://theme/clear"
220− opacity: parent.enabled
224+ opacity: parent.enabled
221− visible: opacity > 0
225+ visible: opacity > 0
222− Behavior on opacity {
226+ Behavior on opacity {
223− UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration }
227+ UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration }
227− onClicked: {
231+ onClicked: {
228− if (searchTextField.clearIsSettings) {
232+ if (searchTextField.clearIsSettings) {
229− root.showFiltersPopup(clearOrSettingsButton);
233+ root.showFiltersPopup(clearOrSettingsButton);
230− } else {
234+ } else {
231− root.clearSearch(true);
235+ root.clearSearch(true);
241+ visible: searchTextField.clearIsSettings && root.activeFiltersCount > 0
242+ height: parent.height
243+ text: root.activeFiltersCount
244+ verticalAlignment: Text.AlignVCenter
236 onActiveFocusChanged: {
248 onActiveFocusChanged: {