on xenial help sign in
Make the cancelButton be bigger than jsut exactly the cancel text
2abd5b4Albert Astals Cid
qml/Dash/DashPageHeader.qml+19−15
@@ -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)
266 }
267 }
267
268
268 Icon {
269 Icon {
@@ -277,25 +278,28 @@ Item {
277 }
278 }
278 }
279 }
279
280
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)
290 }
288 }
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: {
289+ onClicked: {
297− root.clearSearch(false);
290+ root.clearSearch(false);
298− headerContainer.showSearch = 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)
299 }
303 }
300 }
304 }
301 }
305 }