@@ -261,8 +261,9 @@ Item {
261 visible: width > 0
261 visible: width > 0
262 anchors {
262 anchors {
263 top: parent.top
263 top: parent.top
264− right: cancelLabel.left
264+ right: cancelButton.left
265 bottom: parent.bottom
265 bottom: parent.bottom
266+ rightMargin: units.gu(-1)
@@ -277,25 +278,28 @@ Item {
280− Label {
281+ AbstractButton {
281− id: cancelLabel
282+ id: cancelButton
282− text: i18n.tr("Cancel")
283+ width: cancelLabel.width + cancelLabel.anchors.rightMargin + cancelLabel.anchors.leftMargin
283− color: header.panelForegroundColor
284− verticalAlignment: Text.AlignVCenter
285 anchors {
284 anchors {
286 top: parent.top
285 top: parent.top
287 right: parent.right
286 right: parent.right
288 bottom: parent.bottom
287 bottom: parent.bottom
289− margins: units.gu(2)
292− anchors.fill: parent
293− // So that clicking in the empty area on the left of Cancel
294− // has the same effect as clicking on the empty area on the right
295− anchors.leftMargin: units.gu(-2)
296− onClicked: {
289+ onClicked: {
297− root.clearSearch(false);
290+ root.clearSearch(false);
298− headerContainer.showSearch = false;
291+ headerContainer.showSearch = false;
295+ text: i18n.tr("Cancel")
296+ color: header.panelForegroundColor
297+ verticalAlignment: Text.AlignVCenter
299+ verticalCenter: parent.verticalCenter
301+ rightMargin: units.gu(2)
302+ leftMargin: units.gu(1)
@@ -314,6 +318,7 @@ Item {
314 property color panelColor: background.topColor
318 property color panelColor: background.topColor
315 panelForegroundColor: config.foregroundColor
319 panelForegroundColor: config.foregroundColor
316 config: PageHeadConfiguration {
320 config: PageHeadConfiguration {
317 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
322 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
318 backAction: Action {
323 backAction: Action {
319 iconName: backIsClose ? "close" : "back"
324 iconName: backIsClose ? "close" : "back"
@@ -354,21 +359,6 @@ Item {
354 onTriggered: root.favoriteClicked()
359 onTriggered: root.favoriteClicked()
359− visible: header.contents === null
360− LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
364− verticalCenter: parent.verticalCenter
367− font.weight: header.fontWeight
368− fontSize: header.fontSize
369− color: header.panelForegroundColor
370− elide: Text.ElideRight
374 property var contents: null
364 property var contents: null