@@ -219,41 +219,50 @@ Item {
222− secondaryItem: Row {
222+ secondaryItem: AbstractButton {
223+ id: clearOrSettingsButton
223 height: searchTextField.height
225 height: searchTextField.height
228+ enabled: searchTextField.text.length > 0 || root.navigationTag != ""
225− AbstractButton {
230+ Row {
226− id: clearOrSettingsButton
231+ id: row
227 height: parent.height
232 height: parent.height
235+ height: parent.height
228− width: height
236+ width: height
229− enabled: searchTextField.text.length > 0 || root.navigationTag != ""
237+
232− objectName: "clearIcon"
233− anchors.fill: parent
239+ anchors.fill: parent
234− anchors.margins: units.gu(1)
240+ anchors.margins: units.gu(1)
242+ objectName: "clearIcon"
235− source: searchTextField.clearIsSettings ? "image://theme/filters" : "image://theme/clear"
243+ source: searchTextField.clearIsSettings ? "image://theme/filters" : "image://theme/clear"
236− opacity: parent.enabled
244+ opacity: parent.enabled
237− visible: opacity > 0
245+ visible: opacity > 0
238− Behavior on opacity {
246+ Behavior on opacity {
239− UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration }
247+ UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration }
243− onClicked: {
252+ Label {
244− if (searchTextField.clearIsSettings) {
253+ visible: searchTextField.clearIsSettings && root.activeFiltersCount > 0
245− root.showFiltersPopup(clearOrSettingsButton);
254+ height: parent.height
246− } else {
255+ text: "(" + root.activeFiltersCount + ")"
247− root.clearSearch(true);
256+ verticalAlignment: Text.AlignVCenter
252− Label {
260+ onClicked: {
253− visible: searchTextField.clearIsSettings && root.activeFiltersCount > 0
261+ if (searchTextField.clearIsSettings) {
254− height: parent.height
262+ root.showFiltersPopup(clearOrSettingsButton);
255− text: "(" + root.activeFiltersCount + ")"
263+ } else {
256− verticalAlignment: Text.AlignVCenter
264+ root.clearSearch(true);