@@ -200,12 +200,10 @@ Item {
200 left: parent.left
200 left: parent.left
201 bottom: parent.bottom
201 bottom: parent.bottom
202 bottomMargin: units.gu(1)
202 bottomMargin: units.gu(1)
203− right: cancelLabel.left
203+ right: settingsButton.left
204− rightMargin: units.gu(2)
204+ rightMargin: settingsButton.visible ? 0 : units.gu(2)
207− readonly property bool clearIsSettings: !searchTextField.focus && root.scopeHasFilters
209 primaryItem: Rectangle {
207 primaryItem: Rectangle {
210 color: "#F5F4F5"
208 color: "#F5F4F5"
211 width: root.navigationTag != "" ? tagLabel.width + units.gu(2) : 0
209 width: root.navigationTag != "" ? tagLabel.width + units.gu(2) : 0
@@ -220,49 +218,25 @@ Item {
222 secondaryItem: AbstractButton {
220 secondaryItem: AbstractButton {
223− id: clearOrSettingsButton
221+ id: clearButton
225 height: searchTextField.height
222 height: searchTextField.height
226− width: row.width
223+ width: height
228 enabled: searchTextField.text.length > 0 || root.navigationTag != ""
224 enabled: searchTextField.text.length > 0 || root.navigationTag != ""
232− height: parent.height
235− height: parent.height
227+ objectName: "clearIcon"
239− anchors.fill: parent
228+ anchors.fill: parent
240− anchors.margins: units.gu(1)
229+ anchors.margins: units.gu(1)
242− objectName: "clearIcon"
243− source: searchTextField.clearIsSettings ? "image://theme/filters" : "image://theme/clear"
230+ source: "image://theme/clear"
244− opacity: parent.enabled
231+ opacity: parent.enabled
245− visible: opacity > 0
232+ visible: opacity > 0
246− Behavior on opacity {
233+ Behavior on opacity {
247− UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration }
234+ UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration }
253− visible: searchTextField.clearIsSettings && root.activeFiltersCount > 0
254− height: parent.height
255− text: "(" + root.activeFiltersCount + ")"
256− verticalAlignment: Text.AlignVCenter
260 onClicked: {
238 onClicked: {
261− if (searchTextField.clearIsSettings) {
262− root.showFiltersPopup(clearOrSettingsButton);
264− root.clearSearch(true);
239+ root.clearSearch(true);
@@ -280,6 +254,29 @@ Item {
260+ width: root.scopeHasFilters && clearButton.enabled ? height : 0
264+ right: cancelLabel.left
265+ bottom: parent.bottom
269+ anchors.fill: parent
270+ anchors.margins: units.gu(2)
272+ color: root.activeFiltersCount > 0 ? UbuntuColors.orange : Qt.rgba(0.0, 0.0, 0.0, 0.0)
276+ root.showFiltersPopup(settingsButton);
284 id: cancelLabel
281 id: cancelLabel
285 text: i18n.tr("Cancel")
282 text: i18n.tr("Cancel")