@@ -261,8 +261,9 @@ Item {
261261 visible: width > 0
262262 anchors {
263263 top: parent.top
264− right: cancelLabel.left
264+ right: cancelButton.left
265265 bottom: parent.bottom
266+ rightMargin: units.gu(-1)
266267 }
267268
268269 Icon {
@@ -277,25 +278,28 @@ Item {
277278 }
278279 }
279280
280− Label {
281− id: cancelLabel
282− text: i18n.tr("Cancel")
283− color: header.panelForegroundColor
284− verticalAlignment: Text.AlignVCenter
281+ AbstractButton {
282+ id: cancelButton
283+ width: cancelLabel.width + cancelLabel.anchors.rightMargin + cancelLabel.anchors.leftMargin
285284 anchors {
286285 top: parent.top
287286 right: parent.right
288287 bottom: parent.bottom
289− margins: units.gu(2)
290288 }
291− AbstractButton {
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: {
297− root.clearSearch(false);
298− headerContainer.showSearch = false;
289+ onClicked: {
290+ root.clearSearch(false);
291+ headerContainer.showSearch = false;
292+ }
293+ Label {
294+ id: cancelLabel
295+ text: i18n.tr("Cancel")
296+ color: header.panelForegroundColor
297+ verticalAlignment: Text.AlignVCenter
298+ anchors {
299+ verticalCenter: parent.verticalCenter
300+ right: parent.right
301+ rightMargin: units.gu(2)
302+ leftMargin: units.gu(1)
299303 }
300304 }
301305 }
@@ -314,6 +318,7 @@ Item {
314318 property color panelColor: background.topColor
315319 panelForegroundColor: config.foregroundColor
316320 config: PageHeadConfiguration {
321+ title: root.title
317322 foregroundColor: root.scopeStyle ? root.scopeStyle.headerForeground : theme.palette.normal.baseText
318323 backAction: Action {
319324 iconName: backIsClose ? "close" : "back"
@@ -354,21 +359,6 @@ Item {
354359 onTriggered: root.favoriteClicked()
355360 }
356361 ]
357−
358− contents: Label {
359− visible: header.contents === null
360− LayoutMirroring.enabled: Qt.application.layoutDirection == Qt.RightToLeft
361− anchors {
362− left: parent.left
363− right: parent.right
364− verticalCenter: parent.verticalCenter
365− }
366− text: root.title
367− font.weight: header.fontWeight
368− fontSize: header.fontSize
369− color: header.panelForegroundColor
370− elide: Text.ElideRight
371− }
372362 }
373363
374364 property var contents: null